From 3ce74c6e2d05a5f3e1945c78455d43249592ba26 Mon Sep 17 00:00:00 2001 From: shweet Date: Thu, 19 Nov 2026 21:10:23 -0500 Subject: [PATCH] Reconstruction layout: generated-src/ (generated) and src/ (curated), CMake, the first takeover: RNG The decompiled C++ tree moves to generated-src/ (classes.h, C++20); src/ is for code written by hand. A curated function defines the generated declaration and starts its comment with its address, and source_tree.py stops emitting that body. src/rng.cpp takes over RNG (SetSeed, the constructor, Next, RandomInt, RandomFloat, Shuffle) with the shift table read from the exe as a constexpr array; src/log.h names KAGE_LogMessage's levels (1 INFO, 2 NET, 4 WARN, 8 ERROR, 16 ASSERT, from its prefix jump table). CMakeLists.txt builds src/*.cpp against generated-src/classes.h (clean with -Wall -Wextra). structs.hpp and headers.py are retired: scripts/merge_fields.py writes the merged field list, classes.h checks the layout. Co-Authored-By: Claude Opus 5.5 --- .gitignore | 1 + CMakeLists.txt | 13 + README.md | 26 +- build.sh | 10 +- .../achievement_overlay.cpp | 2 +- .../afterbirth_persistent_game_data.cpp | 2 +- {src/game => generated-src}/ambush.cpp | 2 +- .../game => generated-src}/animation_data.cpp | 2 +- .../animation_layer.cpp | 2 +- .../animation_state.cpp | 2 +- {src/game => generated-src}/anm2.cpp | 2 +- {src/game => generated-src}/anm_cache.cpp | 2 +- {src/game => generated-src}/anm_file_data.cpp | 2 +- {src/game => generated-src}/backdrop.cpp | 2 +- .../backdrop_config.cpp | 2 +- {src/game => generated-src}/beam_renderer.cpp | 2 +- {src/game => generated-src}/beast_arena.cpp | 2 +- {src/game => generated-src}/bit_set128.cpp | 2 +- {src/game => generated-src}/blend_mode.cpp | 2 +- {src/game => generated-src}/boss_overlay.cpp | 2 +- {src/game => generated-src}/boss_pool.cpp | 2 +- {src/game => generated-src}/camera.cpp | 2 +- {src/game => generated-src}/capsule.cpp | 2 +- {src/game => generated-src}/card.cpp | 2 +- {src/game => generated-src}/cell_space.cpp | 2 +- .../challenge_param.cpp | 2 +- .../challenge_params.cpp | 2 +- {src/game => generated-src}/checksum.cpp | 2 +- .../classes.hpp => generated-src/classes.h | 0 {src/game => generated-src}/color.cpp | 2 +- .../color_mod_state.cpp | 2 +- {src/game => generated-src}/color_quad.cpp | 2 +- .../game => generated-src}/command_thread.cpp | 2 +- .../completion_widget.cpp | 2 +- {src/game => generated-src}/config.cpp | 2 +- {src/game => generated-src}/console.cpp | 2 +- {src/game => generated-src}/cutscene.cpp | 2 +- .../cutscene/anm2_part.cpp | 2 +- .../cutscene/temporary_part.cpp | 2 +- .../game => generated-src}/cutscene_entry.cpp | 2 +- {src/game => generated-src}/cutscene_part.cpp | 2 +- .../daily_challenge.cpp | 2 +- {src/game => generated-src}/damage_info.cpp | 2 +- {src/game => generated-src}/date_time.cpp | 2 +- .../deathmatch_manager.cpp | 2 +- .../deathmatch_type_base.cpp | 2 +- .../game => generated-src}/debug_renderer.cpp | 2 +- {src/game => generated-src}/emote_wheel.cpp | 2 +- {src/game => generated-src}/entity.cpp | 2 +- {src/game => generated-src}/entity_bomb.cpp | 2 +- {src/game => generated-src}/entity_config.cpp | 2 +- .../entity_config_entity.cpp | 2 +- .../entity_config_player.cpp | 2 +- {src/game => generated-src}/entity_dummy.cpp | 2 +- {src/game => generated-src}/entity_effect.cpp | 2 +- .../entity_effect/extra_data_ref.cpp | 2 +- .../game => generated-src}/entity_factory.cpp | 2 +- .../entity_familiar.cpp | 2 +- {src/game => generated-src}/entity_knife.cpp | 2 +- {src/game => generated-src}/entity_laser.cpp | 2 +- {src/game => generated-src}/entity_list.cpp | 2 +- .../game => generated-src}/entity_list_el.cpp | 2 +- .../entity_list_query.cpp | 2 +- {src/game => generated-src}/entity_npc.cpp | 2 +- .../entity_partition.cpp | 2 +- {src/game => generated-src}/entity_pickup.cpp | 2 +- {src/game => generated-src}/entity_player.cpp | 2 +- .../entity_projectile.cpp | 2 +- {src/game => generated-src}/entity_ptr.cpp | 2 +- {src/game => generated-src}/entity_ref.cpp | 2 +- .../entity_save_state.cpp | 2 +- .../entity_save_state_ref.cpp | 2 +- {src/game => generated-src}/entity_slot.cpp | 2 +- {src/game => generated-src}/entity_tear.cpp | 2 +- {src/game => generated-src}/entity_text.cpp | 2 +- {src/game => generated-src}/file_system.cpp | 2 +- {src/game => generated-src}/font.cpp | 2 +- {src/game => generated-src}/font_settings.cpp | 2 +- .../game => generated-src}/formatted_text.cpp | 2 +- {src/game => generated-src}/frame_queue.cpp | 2 +- {src/game => generated-src}/friend_entry.cpp | 2 +- {src/game => generated-src}/fx_layer.cpp | 2 +- {src/game => generated-src}/fx_layers.cpp | 2 +- {src/game => generated-src}/fx_params.cpp | 2 +- {src/game => generated-src}/game.cpp | 2 +- {src/game => generated-src}/game_over.cpp | 2 +- {src/game => generated-src}/game_state.cpp | 2 +- .../game_state_player.cpp | 2 +- .../game_state_slot.cpp | 2 +- {src/game => generated-src}/generic_popup.cpp | 2 +- .../game => generated-src}/generic_prompt.cpp | 2 +- .../glitched_collectible_gfx.cpp | 2 +- .../glitched_item_set.cpp | 2 +- .../graphics_window.cpp | 2 +- {src/game => generated-src}/grid_entity.cpp | 2 +- .../grid_entity_decoration.cpp | 2 +- .../grid_entity_door.cpp | 2 +- .../grid_entity_fire.cpp | 2 +- .../grid_entity_gravity.cpp | 2 +- .../grid_entity_lock.cpp | 2 +- .../grid_entity_pit.cpp | 2 +- .../grid_entity_poop.cpp | 2 +- .../grid_entity_pressure_plate.cpp | 2 +- .../grid_entity_rock.cpp | 2 +- .../grid_entity_spikes.cpp | 2 +- .../grid_entity_stairs.cpp | 2 +- .../grid_entity_statue.cpp | 2 +- .../grid_entity_teleporter.cpp | 2 +- .../grid_entity_tnt.cpp | 2 +- .../grid_entity_trap_door.cpp | 2 +- .../grid_entity_wall.cpp | 2 +- .../grid_entity_web.cpp | 2 +- .../hallucination_overlay.cpp | 2 +- {src/game => generated-src}/history.cpp | 2 +- {src/game => generated-src}/homing_laser.cpp | 2 +- {src/game => generated-src}/hud.cpp | 2 +- {src/game => generated-src}/hud_message.cpp | 2 +- {src/game => generated-src}/image_base.cpp | 2 +- {src/game => generated-src}/image_png.cpp | 2 +- {src/game => generated-src}/info_display.cpp | 2 +- .../info_display_config.cpp | 2 +- .../info_display_entry.cpp | 2 +- .../info_display_item.cpp | 2 +- .../info_display_text.cpp | 2 +- {src/game => generated-src}/input_manager.cpp | 2 +- .../invite_friends_menu.cpp | 2 +- .../isaac_repentance_plus/weapon.cpp | 2 +- {src/game => generated-src}/item.cpp | 2 +- {src/game => generated-src}/item_config.cpp | 2 +- .../item_config_card.cpp | 2 +- .../item_config_costume.cpp | 2 +- .../item_config_item.cpp | 2 +- {src/game => generated-src}/item_overlay.cpp | 2 +- {src/game => generated-src}/item_pool.cpp | 2 +- {src/game => generated-src}/k_color.cpp | 2 +- .../kage/eos_manager.cpp | 2 +- .../kage/filesys/archived_file.cpp | 2 +- .../kage/filesys/buffered_stream.cpp | 2 +- .../kage/filesys/file_map.cpp | 2 +- .../kage/graphics/graphics_buffer_object.cpp | 2 +- .../kage/graphics/image_base.cpp | 2 +- .../kage/graphics/manager.cpp | 2 +- .../kage/graphics/shader_base.cpp | 2 +- .../kage/input/input_device.cpp | 2 +- .../kage/input/input_device_gamepad.cpp | 2 +- .../kage/input/input_device_keyboard.cpp | 2 +- .../network/multiplayer/connection_base.cpp | 2 +- .../kage/network/multiplayer/const_lobby.cpp | 2 +- .../kage/network/multiplayer/lobby.cpp | 2 +- .../network/multiplayer/lobby_localhost.cpp | 2 +- .../kage/network/multiplayer/lobby_steam.cpp | 2 +- .../kage/network/multiplayer/service_base.cpp | 2 +- .../kage/network/multiplayer/service_eos.cpp | 2 +- .../network/multiplayer/service_localhost.cpp | 2 +- .../kage/network/multiplayer_manager.cpp | 2 +- .../kage/smart_pointer.cpp | 2 +- .../kage/sound/manager.cpp | 2 +- .../kage/sound/manager_open_al.cpp | 2 +- .../kage/system/friend_manager.cpp | 2 +- .../kage/system/leaderboard_manager.cpp | 2 +- .../kage/system/user_profile.cpp | 2 +- .../kage_filesys_file_manager.cpp | 2 +- {src/game => generated-src}/kage_graphics.cpp | 2 +- .../kage_graphics_image_manager.cpp | 2 +- {src/game => generated-src}/key_configs.cpp | 2 +- .../l_room_tile_desc.cpp | 2 +- .../layer_animation.cpp | 2 +- {src/game => generated-src}/layer_state.cpp | 2 +- {src/game => generated-src}/leaderboard.cpp | 2 +- {src/game => generated-src}/level.cpp | 2 +- .../level_generator.cpp | 2 +- .../level_generator_room.cpp | 2 +- {src/game => generated-src}/lobby.cpp | 2 +- {src/game => generated-src}/lobby_list.cpp | 2 +- .../lobby_localhost.cpp | 2 +- .../lobby_password_prompt.cpp | 2 +- .../game => generated-src}/lobby_settings.cpp | 2 +- {src/game => generated-src}/loot_list.cpp | 2 +- {src/game => generated-src}/lua_engine.cpp | 2 +- {src/game => generated-src}/lua_ref.cpp | 2 +- {src/game => generated-src}/manager.cpp | 2 +- {src/game => generated-src}/mem_map_base.cpp | 2 +- {src/game => generated-src}/menu_bestiary.cpp | 2 +- .../game => generated-src}/menu_challenge.cpp | 2 +- .../game => generated-src}/menu_character.cpp | 2 +- .../menu_character_entry.cpp | 2 +- .../menu_collection.cpp | 2 +- .../menu_controller_select.cpp | 2 +- .../menu_create_lobby.cpp | 2 +- .../menu_custom_challenge.cpp | 2 +- .../game => generated-src}/menu_cutscenes.cpp | 2 +- .../menu_daily_challenge.cpp | 2 +- {src/game => generated-src}/menu_dialog.cpp | 2 +- {src/game => generated-src}/menu_game.cpp | 2 +- .../menu_key_config.cpp | 2 +- .../menu_lobby_list.cpp | 2 +- .../menu_lobby_list_filters.cpp | 2 +- {src/game => generated-src}/menu_manager.cpp | 2 +- .../menu_mod_challenges.cpp | 2 +- {src/game => generated-src}/menu_mods.cpp | 2 +- {src/game => generated-src}/menu_online.cpp | 2 +- .../menu_online_lobby.cpp | 2 +- .../menu_online_lobby_list.cpp | 2 +- .../menu_online_mode.cpp | 2 +- {src/game => generated-src}/menu_options.cpp | 2 +- {src/game => generated-src}/menu_save.cpp | 2 +- .../menu_special_seeds.cpp | 2 +- {src/game => generated-src}/menu_stats.cpp | 2 +- {src/game => generated-src}/menu_title.cpp | 2 +- {src/game => generated-src}/message_popup.cpp | 2 +- {src/game => generated-src}/minimap.cpp | 2 +- {src/game => generated-src}/mod.cpp | 2 +- {src/game => generated-src}/mod_entry.cpp | 2 +- {src/game => generated-src}/mod_manager.cpp | 2 +- {src/game => generated-src}/mtrng.cpp | 2 +- {src/game => generated-src}/multiplayer.cpp | 2 +- {src/game => generated-src}/music.cpp | 2 +- {src/game => generated-src}/music_channel.cpp | 2 +- {src/game => generated-src}/music_manager.cpp | 2 +- {src/game => generated-src}/mutex.cpp | 2 +- .../mutex/scope_lock.cpp | 2 +- .../net_desync_handler.cpp | 2 +- .../net_input_device.cpp | 2 +- .../netplay_manager.cpp | 2 +- .../netplay_text_popup.cpp | 2 +- .../network_manager.cpp | 2 +- .../nightmare_scene.cpp | 2 +- {src/game => generated-src}/npc_helper.cpp | 2 +- .../npcai_pathfinder.cpp | 2 +- {src/game => generated-src}/online_chat.cpp | 2 +- .../online_chat_message.cpp | 2 +- {src/game => generated-src}/online_emotes.cpp | 2 +- .../online_stats_screen.cpp | 2 +- .../game => generated-src}/options_config.cpp | 2 +- {src/game => generated-src}/path_finder.cpp | 2 +- {src/game => generated-src}/path_node.cpp | 2 +- {src/game => generated-src}/pause_screen.cpp | 2 +- .../pause_screen_my_stuff.cpp | 2 +- .../persistent_game_data.cpp | 2 +- .../persistent_game_data_bestiary.cpp | 2 +- .../persistent_game_data_reader.cpp | 2 +- .../persistent_game_data_writer.cpp | 2 +- {src/game => generated-src}/pill_effect.cpp | 2 +- {src/game => generated-src}/player_hud.cpp | 2 +- .../game => generated-src}/player_manager.cpp | 2 +- {src/game => generated-src}/png_writer.cpp | 2 +- .../pocket_item_config.cpp | 2 +- {src/game => generated-src}/point.cpp | 2 +- {src/game => generated-src}/popup.cpp | 2 +- {src/game => generated-src}/popup_buttons.cpp | 2 +- {src/game => generated-src}/popup_manager.cpp | 2 +- {src/game => generated-src}/popup_queue.cpp | 2 +- {src/game => generated-src}/popup_window.cpp | 2 +- .../preload_manager.cpp | 2 +- .../procedural_effect.cpp | 2 +- .../procedural_item_manager.cpp | 2 +- .../projectile_params.cpp | 2 +- {src/game => generated-src}/quad.cpp | 2 +- .../queue_item_data.cpp | 2 +- {src/game => generated-src}/rail_manager.cpp | 2 +- .../rebirth_save_data.cpp | 2 +- .../reference_count_base.cpp | 2 +- {src/game => generated-src}/render_batch.cpp | 2 +- {src/game => generated-src}/render_target.cpp | 2 +- .../revive_player_menu.cpp | 2 +- {src/game => generated-src}/rich_text.cpp | 2 +- .../game => generated-src}/rich_text_icon.cpp | 2 +- .../game => generated-src}/rich_text_span.cpp | 2 +- {src/game => generated-src}/rng.cpp | 2 +- {src/game => generated-src}/room.cpp | 2 +- {src/game => generated-src}/room_config.cpp | 2 +- .../room_config_mode.cpp | 2 +- .../room_config_room.cpp | 2 +- .../room_config_stage.cpp | 2 +- .../room_descriptor.cpp | 2 +- .../game => generated-src}/room_grid_path.cpp | 2 +- {src/game => generated-src}/room_set.cpp | 2 +- .../room_transition.cpp | 2 +- .../save_data_manager.cpp | 2 +- {src/game => generated-src}/score_sheet.cpp | 2 +- {src/game => generated-src}/seeds.cpp | 2 +- {src/game => generated-src}/sfx_manager.cpp | 2 +- {src/game => generated-src}/shader.cpp | 2 +- {src/game => generated-src}/shape.cpp | 2 +- {src/game => generated-src}/shared_ptr.cpp | 2 +- .../shared_ptr_pair.cpp | 2 +- .../shockwave_params.cpp | 2 +- {src/game => generated-src}/sound_effect.cpp | 2 +- {src/game => generated-src}/sound_effects.cpp | 2 +- .../game => generated-src}/sound_instance.cpp | 2 +- {src/game => generated-src}/sound_manager.cpp | 2 +- {src/game => generated-src}/source_quad.cpp | 2 +- {src/game => generated-src}/spawn.cpp | 2 +- {src/game => generated-src}/special_seed.cpp | 2 +- {src/game => generated-src}/sprite.cpp | 2 +- .../stage_transition.cpp | 2 +- {src/game => generated-src}/stat_hud.cpp | 2 +- {src/game => generated-src}/stats_panel.cpp | 2 +- {src/game => generated-src}/string_table.cpp | 2 +- {src/game => generated-src}/tear_params.cpp | 2 +- .../temporary_effect.cpp | 2 +- .../temporary_effects.cpp | 2 +- .../umbilical_baby_data.cpp | 2 +- {src/game => generated-src}/user_profile.cpp | 2 +- {src/game => generated-src}/vector.cpp | 2 +- {src/game => generated-src}/video_player.cpp | 2 +- {src/game => generated-src}/weapon.cpp | 2 +- {src/game => generated-src}/weapon_bombs.cpp | 2 +- {src/game => generated-src}/weapon_bone.cpp | 2 +- .../weapon_brimstone.cpp | 2 +- .../weapon_deathmatch.cpp | 2 +- {src/game => generated-src}/weapon_fetus.cpp | 2 +- {src/game => generated-src}/weapon_knife.cpp | 2 +- {src/game => generated-src}/weapon_laser.cpp | 2 +- .../weapon_monstros_lung.cpp | 2 +- .../game => generated-src}/weapon_rockets.cpp | 2 +- .../weapon_spirit_sword.cpp | 2 +- {src/game => generated-src}/weapon_tears.cpp | 2 +- {src/game => generated-src}/weapon_tech_x.cpp | 2 +- .../weapon_urn_of_souls.cpp | 2 +- .../weighted_outcome_picker.cpp | 2 +- {src/game => generated-src}/window.cpp | 2 +- {src/game => generated-src}/wisp_entry.cpp | 2 +- .../xml_memory_pool.cpp | 2 +- {src/game => generated-src}/xml_node.cpp | 2 +- scripts/headers.py | 82 - scripts/merge_fields.py | 23 + scripts/source_tree.py | 20 +- src/log.h | 11 + src/rng.cpp | 79 + src/structs.hpp | 7415 ----------------- 331 files changed, 485 insertions(+), 7835 deletions(-) create mode 100644 CMakeLists.txt rename {src/game => generated-src}/achievement_overlay.cpp (99%) rename {src/game => generated-src}/afterbirth_persistent_game_data.cpp (99%) rename {src/game => generated-src}/ambush.cpp (99%) rename {src/game => generated-src}/animation_data.cpp (98%) rename {src/game => generated-src}/animation_layer.cpp (99%) rename {src/game => generated-src}/animation_state.cpp (99%) rename {src/game => generated-src}/anm2.cpp (99%) rename {src/game => generated-src}/anm_cache.cpp (99%) rename {src/game => generated-src}/anm_file_data.cpp (99%) rename {src/game => generated-src}/backdrop.cpp (99%) rename {src/game => generated-src}/backdrop_config.cpp (99%) rename {src/game => generated-src}/beam_renderer.cpp (99%) rename {src/game => generated-src}/beast_arena.cpp (99%) rename {src/game => generated-src}/bit_set128.cpp (99%) rename {src/game => generated-src}/blend_mode.cpp (98%) rename {src/game => generated-src}/boss_overlay.cpp (99%) rename {src/game => generated-src}/boss_pool.cpp (99%) rename {src/game => generated-src}/camera.cpp (99%) rename {src/game => generated-src}/capsule.cpp (99%) rename {src/game => generated-src}/card.cpp (98%) rename {src/game => generated-src}/cell_space.cpp (99%) rename {src/game => generated-src}/challenge_param.cpp (98%) rename {src/game => generated-src}/challenge_params.cpp (99%) rename {src/game => generated-src}/checksum.cpp (99%) rename src/game/classes.hpp => generated-src/classes.h (100%) rename {src/game => generated-src}/color.cpp (99%) rename {src/game => generated-src}/color_mod_state.cpp (98%) rename {src/game => generated-src}/color_quad.cpp (99%) rename {src/game => generated-src}/command_thread.cpp (98%) rename {src/game => generated-src}/completion_widget.cpp (99%) rename {src/game => generated-src}/config.cpp (98%) rename {src/game => generated-src}/console.cpp (99%) rename {src/game => generated-src}/cutscene.cpp (99%) rename {src/game => generated-src}/cutscene/anm2_part.cpp (99%) rename {src/game => generated-src}/cutscene/temporary_part.cpp (99%) rename {src/game => generated-src}/cutscene_entry.cpp (99%) rename {src/game => generated-src}/cutscene_part.cpp (99%) rename {src/game => generated-src}/daily_challenge.cpp (99%) rename {src/game => generated-src}/damage_info.cpp (97%) rename {src/game => generated-src}/date_time.cpp (99%) rename {src/game => generated-src}/deathmatch_manager.cpp (99%) rename {src/game => generated-src}/deathmatch_type_base.cpp (99%) rename {src/game => generated-src}/debug_renderer.cpp (99%) rename {src/game => generated-src}/emote_wheel.cpp (99%) rename {src/game => generated-src}/entity.cpp (99%) rename {src/game => generated-src}/entity_bomb.cpp (99%) rename {src/game => generated-src}/entity_config.cpp (99%) rename {src/game => generated-src}/entity_config_entity.cpp (99%) rename {src/game => generated-src}/entity_config_player.cpp (99%) rename {src/game => generated-src}/entity_dummy.cpp (98%) rename {src/game => generated-src}/entity_effect.cpp (99%) rename {src/game => generated-src}/entity_effect/extra_data_ref.cpp (98%) rename {src/game => generated-src}/entity_factory.cpp (99%) rename {src/game => generated-src}/entity_familiar.cpp (99%) rename {src/game => generated-src}/entity_knife.cpp (99%) rename {src/game => generated-src}/entity_laser.cpp (99%) rename {src/game => generated-src}/entity_list.cpp (99%) rename {src/game => generated-src}/entity_list_el.cpp (98%) rename {src/game => generated-src}/entity_list_query.cpp (94%) rename {src/game => generated-src}/entity_npc.cpp (99%) rename {src/game => generated-src}/entity_partition.cpp (99%) rename {src/game => generated-src}/entity_pickup.cpp (99%) rename {src/game => generated-src}/entity_player.cpp (99%) rename {src/game => generated-src}/entity_projectile.cpp (99%) rename {src/game => generated-src}/entity_ptr.cpp (98%) rename {src/game => generated-src}/entity_ref.cpp (99%) rename {src/game => generated-src}/entity_save_state.cpp (99%) rename {src/game => generated-src}/entity_save_state_ref.cpp (98%) rename {src/game => generated-src}/entity_slot.cpp (99%) rename {src/game => generated-src}/entity_tear.cpp (99%) rename {src/game => generated-src}/entity_text.cpp (99%) rename {src/game => generated-src}/file_system.cpp (99%) rename {src/game => generated-src}/font.cpp (99%) rename {src/game => generated-src}/font_settings.cpp (93%) rename {src/game => generated-src}/formatted_text.cpp (99%) rename {src/game => generated-src}/frame_queue.cpp (99%) rename {src/game => generated-src}/friend_entry.cpp (97%) rename {src/game => generated-src}/fx_layer.cpp (99%) rename {src/game => generated-src}/fx_layers.cpp (99%) rename {src/game => generated-src}/fx_params.cpp (99%) rename {src/game => generated-src}/game.cpp (99%) rename {src/game => generated-src}/game_over.cpp (99%) rename {src/game => generated-src}/game_state.cpp (99%) rename {src/game => generated-src}/game_state_player.cpp (99%) rename {src/game => generated-src}/game_state_slot.cpp (99%) rename {src/game => generated-src}/generic_popup.cpp (99%) rename {src/game => generated-src}/generic_prompt.cpp (99%) rename {src/game => generated-src}/glitched_collectible_gfx.cpp (97%) rename {src/game => generated-src}/glitched_item_set.cpp (99%) rename {src/game => generated-src}/graphics_window.cpp (95%) rename {src/game => generated-src}/grid_entity.cpp (99%) rename {src/game => generated-src}/grid_entity_decoration.cpp (99%) rename {src/game => generated-src}/grid_entity_door.cpp (99%) rename {src/game => generated-src}/grid_entity_fire.cpp (99%) rename {src/game => generated-src}/grid_entity_gravity.cpp (99%) rename {src/game => generated-src}/grid_entity_lock.cpp (99%) rename {src/game => generated-src}/grid_entity_pit.cpp (99%) rename {src/game => generated-src}/grid_entity_poop.cpp (99%) rename {src/game => generated-src}/grid_entity_pressure_plate.cpp (99%) rename {src/game => generated-src}/grid_entity_rock.cpp (99%) rename {src/game => generated-src}/grid_entity_spikes.cpp (99%) rename {src/game => generated-src}/grid_entity_stairs.cpp (99%) rename {src/game => generated-src}/grid_entity_statue.cpp (98%) rename {src/game => generated-src}/grid_entity_teleporter.cpp (99%) rename {src/game => generated-src}/grid_entity_tnt.cpp (99%) rename {src/game => generated-src}/grid_entity_trap_door.cpp (99%) rename {src/game => generated-src}/grid_entity_wall.cpp (99%) rename {src/game => generated-src}/grid_entity_web.cpp (99%) rename {src/game => generated-src}/hallucination_overlay.cpp (99%) rename {src/game => generated-src}/history.cpp (99%) rename {src/game => generated-src}/homing_laser.cpp (99%) rename {src/game => generated-src}/hud.cpp (99%) rename {src/game => generated-src}/hud_message.cpp (99%) rename {src/game => generated-src}/image_base.cpp (98%) rename {src/game => generated-src}/image_png.cpp (99%) rename {src/game => generated-src}/info_display.cpp (99%) rename {src/game => generated-src}/info_display_config.cpp (99%) rename {src/game => generated-src}/info_display_entry.cpp (99%) rename {src/game => generated-src}/info_display_item.cpp (99%) rename {src/game => generated-src}/info_display_text.cpp (98%) rename {src/game => generated-src}/input_manager.cpp (99%) rename {src/game => generated-src}/invite_friends_menu.cpp (99%) rename {src/game => generated-src}/isaac_repentance_plus/weapon.cpp (98%) rename {src/game => generated-src}/item.cpp (97%) rename {src/game => generated-src}/item_config.cpp (99%) rename {src/game => generated-src}/item_config_card.cpp (98%) rename {src/game => generated-src}/item_config_costume.cpp (97%) rename {src/game => generated-src}/item_config_item.cpp (99%) rename {src/game => generated-src}/item_overlay.cpp (99%) rename {src/game => generated-src}/item_pool.cpp (99%) rename {src/game => generated-src}/k_color.cpp (99%) rename {src/game => generated-src}/kage/eos_manager.cpp (99%) rename {src/game => generated-src}/kage/filesys/archived_file.cpp (99%) rename {src/game => generated-src}/kage/filesys/buffered_stream.cpp (99%) rename {src/game => generated-src}/kage/filesys/file_map.cpp (99%) rename {src/game => generated-src}/kage/graphics/graphics_buffer_object.cpp (98%) rename {src/game => generated-src}/kage/graphics/image_base.cpp (98%) rename {src/game => generated-src}/kage/graphics/manager.cpp (99%) rename {src/game => generated-src}/kage/graphics/shader_base.cpp (99%) rename {src/game => generated-src}/kage/input/input_device.cpp (99%) rename {src/game => generated-src}/kage/input/input_device_gamepad.cpp (99%) rename {src/game => generated-src}/kage/input/input_device_keyboard.cpp (99%) rename {src/game => generated-src}/kage/network/multiplayer/connection_base.cpp (99%) rename {src/game => generated-src}/kage/network/multiplayer/const_lobby.cpp (98%) rename {src/game => generated-src}/kage/network/multiplayer/lobby.cpp (99%) rename {src/game => generated-src}/kage/network/multiplayer/lobby_localhost.cpp (99%) rename {src/game => generated-src}/kage/network/multiplayer/lobby_steam.cpp (99%) rename {src/game => generated-src}/kage/network/multiplayer/service_base.cpp (99%) rename {src/game => generated-src}/kage/network/multiplayer/service_eos.cpp (99%) rename {src/game => generated-src}/kage/network/multiplayer/service_localhost.cpp (99%) rename {src/game => generated-src}/kage/network/multiplayer_manager.cpp (99%) rename {src/game => generated-src}/kage/smart_pointer.cpp (99%) rename {src/game => generated-src}/kage/sound/manager.cpp (98%) rename {src/game => generated-src}/kage/sound/manager_open_al.cpp (99%) rename {src/game => generated-src}/kage/system/friend_manager.cpp (99%) rename {src/game => generated-src}/kage/system/leaderboard_manager.cpp (99%) rename {src/game => generated-src}/kage/system/user_profile.cpp (99%) rename {src/game => generated-src}/kage_filesys_file_manager.cpp (99%) rename {src/game => generated-src}/kage_graphics.cpp (99%) rename {src/game => generated-src}/kage_graphics_image_manager.cpp (99%) rename {src/game => generated-src}/key_configs.cpp (99%) rename {src/game => generated-src}/l_room_tile_desc.cpp (99%) rename {src/game => generated-src}/layer_animation.cpp (93%) rename {src/game => generated-src}/layer_state.cpp (99%) rename {src/game => generated-src}/leaderboard.cpp (99%) rename {src/game => generated-src}/level.cpp (99%) rename {src/game => generated-src}/level_generator.cpp (99%) rename {src/game => generated-src}/level_generator_room.cpp (99%) rename {src/game => generated-src}/lobby.cpp (99%) rename {src/game => generated-src}/lobby_list.cpp (97%) rename {src/game => generated-src}/lobby_localhost.cpp (99%) rename {src/game => generated-src}/lobby_password_prompt.cpp (99%) rename {src/game => generated-src}/lobby_settings.cpp (98%) rename {src/game => generated-src}/loot_list.cpp (99%) rename {src/game => generated-src}/lua_engine.cpp (99%) rename {src/game => generated-src}/lua_ref.cpp (97%) rename {src/game => generated-src}/manager.cpp (99%) rename {src/game => generated-src}/mem_map_base.cpp (90%) rename {src/game => generated-src}/menu_bestiary.cpp (99%) rename {src/game => generated-src}/menu_challenge.cpp (99%) rename {src/game => generated-src}/menu_character.cpp (99%) rename {src/game => generated-src}/menu_character_entry.cpp (97%) rename {src/game => generated-src}/menu_collection.cpp (99%) rename {src/game => generated-src}/menu_controller_select.cpp (99%) rename {src/game => generated-src}/menu_create_lobby.cpp (99%) rename {src/game => generated-src}/menu_custom_challenge.cpp (99%) rename {src/game => generated-src}/menu_cutscenes.cpp (99%) rename {src/game => generated-src}/menu_daily_challenge.cpp (99%) rename {src/game => generated-src}/menu_dialog.cpp (99%) rename {src/game => generated-src}/menu_game.cpp (99%) rename {src/game => generated-src}/menu_key_config.cpp (99%) rename {src/game => generated-src}/menu_lobby_list.cpp (99%) rename {src/game => generated-src}/menu_lobby_list_filters.cpp (99%) rename {src/game => generated-src}/menu_manager.cpp (99%) rename {src/game => generated-src}/menu_mod_challenges.cpp (98%) rename {src/game => generated-src}/menu_mods.cpp (99%) rename {src/game => generated-src}/menu_online.cpp (99%) rename {src/game => generated-src}/menu_online_lobby.cpp (99%) rename {src/game => generated-src}/menu_online_lobby_list.cpp (99%) rename {src/game => generated-src}/menu_online_mode.cpp (99%) rename {src/game => generated-src}/menu_options.cpp (99%) rename {src/game => generated-src}/menu_save.cpp (99%) rename {src/game => generated-src}/menu_special_seeds.cpp (99%) rename {src/game => generated-src}/menu_stats.cpp (99%) rename {src/game => generated-src}/menu_title.cpp (99%) rename {src/game => generated-src}/message_popup.cpp (99%) rename {src/game => generated-src}/minimap.cpp (99%) rename {src/game => generated-src}/mod.cpp (99%) rename {src/game => generated-src}/mod_entry.cpp (99%) rename {src/game => generated-src}/mod_manager.cpp (99%) rename {src/game => generated-src}/mtrng.cpp (98%) rename {src/game => generated-src}/multiplayer.cpp (99%) rename {src/game => generated-src}/music.cpp (99%) rename {src/game => generated-src}/music_channel.cpp (99%) rename {src/game => generated-src}/music_manager.cpp (99%) rename {src/game => generated-src}/mutex.cpp (98%) rename {src/game => generated-src}/mutex/scope_lock.cpp (98%) rename {src/game => generated-src}/net_desync_handler.cpp (99%) rename {src/game => generated-src}/net_input_device.cpp (99%) rename {src/game => generated-src}/netplay_manager.cpp (99%) rename {src/game => generated-src}/netplay_text_popup.cpp (99%) rename {src/game => generated-src}/network_manager.cpp (99%) rename {src/game => generated-src}/nightmare_scene.cpp (99%) rename {src/game => generated-src}/npc_helper.cpp (99%) rename {src/game => generated-src}/npcai_pathfinder.cpp (99%) rename {src/game => generated-src}/online_chat.cpp (99%) rename {src/game => generated-src}/online_chat_message.cpp (98%) rename {src/game => generated-src}/online_emotes.cpp (99%) rename {src/game => generated-src}/online_stats_screen.cpp (98%) rename {src/game => generated-src}/options_config.cpp (99%) rename {src/game => generated-src}/path_finder.cpp (99%) rename {src/game => generated-src}/path_node.cpp (98%) rename {src/game => generated-src}/pause_screen.cpp (99%) rename {src/game => generated-src}/pause_screen_my_stuff.cpp (99%) rename {src/game => generated-src}/persistent_game_data.cpp (99%) rename {src/game => generated-src}/persistent_game_data_bestiary.cpp (99%) rename {src/game => generated-src}/persistent_game_data_reader.cpp (99%) rename {src/game => generated-src}/persistent_game_data_writer.cpp (99%) rename {src/game => generated-src}/pill_effect.cpp (97%) rename {src/game => generated-src}/player_hud.cpp (99%) rename {src/game => generated-src}/player_manager.cpp (99%) rename {src/game => generated-src}/png_writer.cpp (99%) rename {src/game => generated-src}/pocket_item_config.cpp (98%) rename {src/game => generated-src}/point.cpp (98%) rename {src/game => generated-src}/popup.cpp (99%) rename {src/game => generated-src}/popup_buttons.cpp (99%) rename {src/game => generated-src}/popup_manager.cpp (98%) rename {src/game => generated-src}/popup_queue.cpp (99%) rename {src/game => generated-src}/popup_window.cpp (99%) rename {src/game => generated-src}/preload_manager.cpp (99%) rename {src/game => generated-src}/procedural_effect.cpp (99%) rename {src/game => generated-src}/procedural_item_manager.cpp (98%) rename {src/game => generated-src}/projectile_params.cpp (98%) rename {src/game => generated-src}/quad.cpp (99%) rename {src/game => generated-src}/queue_item_data.cpp (83%) rename {src/game => generated-src}/rail_manager.cpp (99%) rename {src/game => generated-src}/rebirth_save_data.cpp (99%) rename {src/game => generated-src}/reference_count_base.cpp (96%) rename {src/game => generated-src}/render_batch.cpp (99%) rename {src/game => generated-src}/render_target.cpp (97%) rename {src/game => generated-src}/revive_player_menu.cpp (99%) rename {src/game => generated-src}/rich_text.cpp (99%) rename {src/game => generated-src}/rich_text_icon.cpp (99%) rename {src/game => generated-src}/rich_text_span.cpp (99%) rename {src/game => generated-src}/rng.cpp (99%) rename {src/game => generated-src}/room.cpp (99%) rename {src/game => generated-src}/room_config.cpp (99%) rename {src/game => generated-src}/room_config_mode.cpp (99%) rename {src/game => generated-src}/room_config_room.cpp (99%) rename {src/game => generated-src}/room_config_stage.cpp (99%) rename {src/game => generated-src}/room_descriptor.cpp (99%) rename {src/game => generated-src}/room_grid_path.cpp (98%) rename {src/game => generated-src}/room_set.cpp (98%) rename {src/game => generated-src}/room_transition.cpp (99%) rename {src/game => generated-src}/save_data_manager.cpp (99%) rename {src/game => generated-src}/score_sheet.cpp (99%) rename {src/game => generated-src}/seeds.cpp (99%) rename {src/game => generated-src}/sfx_manager.cpp (99%) rename {src/game => generated-src}/shader.cpp (99%) rename {src/game => generated-src}/shape.cpp (99%) rename {src/game => generated-src}/shared_ptr.cpp (98%) rename {src/game => generated-src}/shared_ptr_pair.cpp (98%) rename {src/game => generated-src}/shockwave_params.cpp (95%) rename {src/game => generated-src}/sound_effect.cpp (99%) rename {src/game => generated-src}/sound_effects.cpp (99%) rename {src/game => generated-src}/sound_instance.cpp (99%) rename {src/game => generated-src}/sound_manager.cpp (99%) rename {src/game => generated-src}/source_quad.cpp (98%) rename {src/game => generated-src}/spawn.cpp (97%) rename {src/game => generated-src}/special_seed.cpp (98%) rename {src/game => generated-src}/sprite.cpp (99%) rename {src/game => generated-src}/stage_transition.cpp (99%) rename {src/game => generated-src}/stat_hud.cpp (99%) rename {src/game => generated-src}/stats_panel.cpp (99%) rename {src/game => generated-src}/string_table.cpp (99%) rename {src/game => generated-src}/tear_params.cpp (99%) rename {src/game => generated-src}/temporary_effect.cpp (93%) rename {src/game => generated-src}/temporary_effects.cpp (99%) rename {src/game => generated-src}/umbilical_baby_data.cpp (92%) rename {src/game => generated-src}/user_profile.cpp (98%) rename {src/game => generated-src}/vector.cpp (99%) rename {src/game => generated-src}/video_player.cpp (99%) rename {src/game => generated-src}/weapon.cpp (99%) rename {src/game => generated-src}/weapon_bombs.cpp (98%) rename {src/game => generated-src}/weapon_bone.cpp (99%) rename {src/game => generated-src}/weapon_brimstone.cpp (99%) rename {src/game => generated-src}/weapon_deathmatch.cpp (90%) rename {src/game => generated-src}/weapon_fetus.cpp (90%) rename {src/game => generated-src}/weapon_knife.cpp (99%) rename {src/game => generated-src}/weapon_laser.cpp (99%) rename {src/game => generated-src}/weapon_monstros_lung.cpp (99%) rename {src/game => generated-src}/weapon_rockets.cpp (96%) rename {src/game => generated-src}/weapon_spirit_sword.cpp (92%) rename {src/game => generated-src}/weapon_tears.cpp (98%) rename {src/game => generated-src}/weapon_tech_x.cpp (84%) rename {src/game => generated-src}/weapon_urn_of_souls.cpp (98%) rename {src/game => generated-src}/weighted_outcome_picker.cpp (99%) rename {src/game => generated-src}/window.cpp (96%) rename {src/game => generated-src}/wisp_entry.cpp (99%) rename {src/game => generated-src}/xml_memory_pool.cpp (98%) rename {src/game => generated-src}/xml_node.cpp (99%) delete mode 100644 scripts/headers.py create mode 100644 scripts/merge_fields.py create mode 100644 src/log.h create mode 100644 src/rng.cpp delete mode 100644 src/structs.hpp diff --git a/.gitignore b/.gitignore index 917898d..eb95474 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ __pycache__/ /build_this.tsv /.tmp/ /CLAUDE.md +/build*/ diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..168faee --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.24) +project(isaac LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +# The curated game: src/*.cpp, written on top of the declarations generated-src/classes.h holds for every class. +# generated-src/'s own bodies stay out until they compile (scripts/source_tree.py --check reports how many do). +file(GLOB SOURCES CONFIGURE_DEPENDS src/*.cpp) +add_library(isaac STATIC ${SOURCES}) +target_include_directories(isaac PRIVATE src) +target_include_directories(isaac SYSTEM PRIVATE generated-src) diff --git a/README.md b/README.md index fca0ad2..58079dc 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,12 @@ it, or paste large parts of it anywhere public. The game install is only read, n db/ YOUR names and types: names.tsv (address -> name, beats every other source), fields.tsv (struct fields), locals.tsv (local variables inside one function), globals.tsv (global data), protos.zhl (signatures) notes/ what is known per entity/item/character/system, with addresses; notes/README.md is the index -src/ C++ checked against the decompile: structs.hpp (generated: every confirmed struct, offsets static_asserted), - game/classes.hpp (generated: the reconstructed classes, bases, vtables, sizes, for the i686 MSVC ABI), - anm2/ (sprite player), rooms/ (.stb + RoomConfig) +generated-src/ GENERATED, do not edit: the decompiled game as C++ for 64-bit Linux (scripts/source_tree.py, each build): + classes.h (every class, Ghidra type, global and function declared; the original 32-bit layout as + LAYOUT32 asserts) and one .cpp per class with its method bodies +src/ human-written C++, replacing generated-src/ one function at a time: a function defined here carries its + address in a comment (// 0040ed50) and the generator stops emitting it. anm2/ and rooms/ are older + standalone reimplementations, to be ported onto the generated class declarations classes.tsv every RTTI class: vftable, size (from its deleting destructor), direct bases, vtable slots decompile.sh print decompiled C for a function (name regex or address), from the dump or live find.sh search: names, strings, string users, code, callers/callees, NPC type -> AI, item id, enums, fields @@ -29,6 +32,21 @@ bin/ private copy of the exe (analysis input; also used to read consta jdk/ ghidra_12.2_PUBLIC/ Temurin 21 (system java is 8, too old) and Ghidra ``` +## Reconstruction + +The goal is a C++ source tree that builds a native 64-bit Linux game: `cmake -B build && cmake --build build`. +`generated-src/` is the whole decompiled game as C++, regenerated every build and never edited. `src/` is the readable +game, written by hand on top of it one function at a time: + +- a function in `src/` defines the method `generated-src/classes.h` declares (Rebirth's names stay, as in + `RNG::RandomInt`), with its address first in the comment above it (`// 007e9020 A number below max ...`). The next + build stops emitting the generated body. `src/rng.cpp` is the first. +- no raw offsets: a field the code needs gets a name in `db/fields.tsv`, and with it a member in `classes.h`. +- constants are `constexpr` with names, read from the exe where they live there (`RNG`'s shift table). + +`scripts/source_tree.py --check` (each build) reports how many generated bodies compile and how many raw offset +accesses are left: each is a 64-bit hazard, since pointer members are wider than in the original. + ## Quick use ```sh @@ -81,7 +99,7 @@ REPENTOGON offset is never evidence by itself, not even between two confirmed ne Entity `_mass` at 0x2d4; the Lua getter reads 0x37c). `scripts/zhl_fields.py` keeps a REPENTOGON field only when a trivial getter or the game's Lua field table confirms it; `db/fields.tsv` holds the rest, each with the function that proves it (about 1,300 so far), and a row with type `-` deletes a wrong one. Anything else is -`field_0xNNN`: unknown, not guessed. `src/structs.hpp` is generated from the same data and only compiles if every offset +`field_0xNNN`: unknown, not guessed. `generated-src/classes.h` is generated from the same data and its LAYOUT32 asserts only hold if every offset is consistent. STL members (`std_vector_*`/`vector_*`, `std_string`, `std_deque_*`, `std_map_*`/`std_set_*`/`std_list_*`) get MSVC's layout, so the dump reads `(g_manager->_itemConfig)._pillEffects._end - ..._begin`; a field of any other unknown type names only its first dword. Structs are padded to a multiple of 4, as MSVC does, so arrays of them get the right stride. diff --git a/build.sh b/build.sh index 5c5c8e7..0747d27 100755 --- a/build.sh +++ b/build.sh @@ -18,10 +18,8 @@ GAME="${GAME:-$HOME/.steam/steam/steamapps/common/The Binding of Isaac Rebirth}" apply_db() { # db names -> struct types (zhl + db fields) G -process isaac-ng.exe -noanalysis -postScript ApplyDb.java "$D/db/names.tsv" P vtable.py "$D/bin/isaac-ng.exe" "$D/dump/functions.tsv" "$D/zhl_vtables.tsv" --classes "$D/dump/all.c" > "$D/classes.tsv" # RTTI: size, bases, slots - P headers.py --merged "$D/build_fields.tsv" "$D/src/structs.hpp" "$D/zhl_fields.tsv" "$D/lua_fields.tsv" "$D/db/fields.tsv" \ + P merge_fields.py "$D/build_fields.tsv" "$D/zhl_fields.tsv" "$D/lua_fields.tsv" "$D/db/fields.tsv" \ <(awk -F'\t' '!/^#/ && $4 != "-" {print $1 "\tsize\t" $4}' "$D/classes.tsv") # later rows win, "-" deletes - echo '#include "structs.hpp"' | g++ -std=c++17 -fsyntax-only -I"$D/src" -x c++ - \ - || echo "src/structs.hpp does not compile: a db/fields.tsv offset contradicts another" >&2 P this_types.py "$D/dump/all.c" "$D/build_fields.tsv" "$D/build_this.tsv" G -process isaac-ng.exe -noanalysis -postScript ApplyTypes.java "$D/build_fields.tsv" "$D/build_this.tsv" G -process isaac-ng.exe -noanalysis -postScript ApplyGlobals.java "$D/db/globals.tsv" @@ -48,9 +46,9 @@ types_dump() { # final dump, built in dump.new and swapped in at the end so re command mv "$D/dump" "$D/dump.old" && command mv "$O" "$D/dump" && command rm -rf "$D/dump.old" source_tree } -source_tree() { # the reconstructed C++ tree (classes.hpp + one .cpp per class), checked against the game's ABI (i686 MSVC) - command rm -rf "$D/src/game" && mkdir -p "$D/src/game" - P source_tree.py "$D/src/game" "$D/classes.tsv" "$D/dump" "$D/zhl_vtables.tsv" --check +source_tree() { # generated-src/: the decompiled C++ tree (classes.h + one .cpp per class) for 64-bit Linux, minus what src/ took over + command rm -rf "$D/generated-src" && mkdir -p "$D/generated-src" + P source_tree.py "$D/generated-src" "$D/classes.tsv" "$D/dump" "$D/zhl_vtables.tsv" --check } if [ "$1" = --db ]; then apply_db diff --git a/src/game/achievement_overlay.cpp b/generated-src/achievement_overlay.cpp similarity index 99% rename from src/game/achievement_overlay.cpp rename to generated-src/achievement_overlay.cpp index 316b7ec..d2adf53 100644 --- a/src/game/achievement_overlay.cpp +++ b/generated-src/achievement_overlay.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009314c0 AchievementOverlay::~AchievementOverlay() diff --git a/src/game/afterbirth_persistent_game_data.cpp b/generated-src/afterbirth_persistent_game_data.cpp similarity index 99% rename from src/game/afterbirth_persistent_game_data.cpp rename to generated-src/afterbirth_persistent_game_data.cpp index eb521bf..f0794db 100644 --- a/src/game/afterbirth_persistent_game_data.cpp +++ b/generated-src/afterbirth_persistent_game_data.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0041d670 byte AfterbirthPersistentGameData::check_header(void *stream) diff --git a/src/game/ambush.cpp b/generated-src/ambush.cpp similarity index 99% rename from src/game/ambush.cpp rename to generated-src/ambush.cpp index 8bb28d3..8d18d33 100644 --- a/src/game/ambush.cpp +++ b/generated-src/ambush.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008332e0 void Ambush::shuffle_waves() diff --git a/src/game/animation_data.cpp b/generated-src/animation_data.cpp similarity index 98% rename from src/game/animation_data.cpp rename to generated-src/animation_data.cpp index f2b6777..cd7d1c6 100644 --- a/src/game/animation_data.cpp +++ b/generated-src/animation_data.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0040b520 int AnimationData::find_null_index(byte *name) diff --git a/src/game/animation_layer.cpp b/generated-src/animation_layer.cpp similarity index 99% rename from src/game/animation_layer.cpp rename to generated-src/animation_layer.cpp index 615491b..4b91e72 100644 --- a/src/game/animation_layer.cpp +++ b/generated-src/animation_layer.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008e3db0 void AnimationLayer::RenderFrame() diff --git a/src/game/animation_state.cpp b/generated-src/animation_state.cpp similarity index 99% rename from src/game/animation_state.cpp rename to generated-src/animation_state.cpp index b70384e..4e6f90b 100644 --- a/src/game/animation_state.cpp +++ b/generated-src/animation_state.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004073b0 byte AnimationState::IsLoopingAnimation() diff --git a/src/game/anm2.cpp b/generated-src/anm2.cpp similarity index 99% rename from src/game/anm2.cpp rename to generated-src/anm2.cpp index 2416fbd..fd03d61 100644 --- a/src/game/anm2.cpp +++ b/generated-src/anm2.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004074c0 void ANM2::constructor() diff --git a/src/game/anm_cache.cpp b/generated-src/anm_cache.cpp similarity index 99% rename from src/game/anm_cache.cpp rename to generated-src/anm_cache.cpp index bcc1fb9..5e860fd 100644 --- a/src/game/anm_cache.cpp +++ b/generated-src/anm_cache.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0040d240 AnmCache::~AnmCache() diff --git a/src/game/anm_file_data.cpp b/generated-src/anm_file_data.cpp similarity index 99% rename from src/game/anm_file_data.cpp rename to generated-src/anm_file_data.cpp index fffcb7e..3e2fe84 100644 --- a/src/game/anm_file_data.cpp +++ b/generated-src/anm_file_data.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0040d850 void AnmFileData::Clear() diff --git a/src/game/backdrop.cpp b/generated-src/backdrop.cpp similarity index 99% rename from src/game/backdrop.cpp rename to generated-src/backdrop.cpp index 7e7752f..2b05e8a 100644 --- a/src/game/backdrop.cpp +++ b/generated-src/backdrop.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00932120 void * Backdrop::render_grid_rect(void *outQuad, int x, int y, int width, int height) diff --git a/src/game/backdrop_config.cpp b/generated-src/backdrop_config.cpp similarity index 99% rename from src/game/backdrop_config.cpp rename to generated-src/backdrop_config.cpp index d81eb93..230b179 100644 --- a/src/game/backdrop_config.cpp +++ b/generated-src/backdrop_config.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00931de0 void BackdropConfig::constructor() diff --git a/src/game/beam_renderer.cpp b/generated-src/beam_renderer.cpp similarity index 99% rename from src/game/beam_renderer.cpp rename to generated-src/beam_renderer.cpp index b3978b3..9f36229 100644 --- a/src/game/beam_renderer.cpp +++ b/generated-src/beam_renderer.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0041e480 void BeamRenderer::Begin(ANM2 *anm2, uint layer, byte isUseOverlay, byte isUnk) diff --git a/src/game/beast_arena.cpp b/generated-src/beast_arena.cpp similarity index 99% rename from src/game/beast_arena.cpp rename to generated-src/beast_arena.cpp index ff4a48f..59cacdc 100644 --- a/src/game/beast_arena.cpp +++ b/generated-src/beast_arena.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00592260 void BeastArena::get_scroll_speed() diff --git a/src/game/bit_set128.cpp b/generated-src/bit_set128.cpp similarity index 99% rename from src/game/bit_set128.cpp rename to generated-src/bit_set128.cpp index cefaed0..93b6ac8 100644 --- a/src/game/bit_set128.cpp +++ b/generated-src/bit_set128.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00417170 BitSet128 * BitSet128::operator_and(BitSet128 *outResult, BitSet128 *a, BitSet128 *b) diff --git a/src/game/blend_mode.cpp b/generated-src/blend_mode.cpp similarity index 98% rename from src/game/blend_mode.cpp rename to generated-src/blend_mode.cpp index 296c791..d6a773b 100644 --- a/src/game/blend_mode.cpp +++ b/generated-src/blend_mode.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a114d0 void BlendMode::SetMode(int mode, int unusedArg) diff --git a/src/game/boss_overlay.cpp b/generated-src/boss_overlay.cpp similarity index 99% rename from src/game/boss_overlay.cpp rename to generated-src/boss_overlay.cpp index eb87a41..b0bb922 100644 --- a/src/game/boss_overlay.cpp +++ b/generated-src/boss_overlay.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004212c0 void BossOverlay::update() diff --git a/src/game/boss_pool.cpp b/generated-src/boss_pool.cpp similarity index 99% rename from src/game/boss_pool.cpp rename to generated-src/boss_pool.cpp index 920825f..c32dfd0 100644 --- a/src/game/boss_pool.cpp +++ b/generated-src/boss_pool.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004218e0 void BossPool::init(uint seed) diff --git a/src/game/camera.cpp b/generated-src/camera.cpp similarity index 99% rename from src/game/camera.cpp rename to generated-src/camera.cpp index 6144374..ee4f6ac 100644 --- a/src/game/camera.cpp +++ b/generated-src/camera.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0091e980 void Camera::UpdateUltrasmooth(uint *param_2, int *param_3) diff --git a/src/game/capsule.cpp b/generated-src/capsule.cpp similarity index 99% rename from src/game/capsule.cpp rename to generated-src/capsule.cpp index 1248567..2edcc86 100644 --- a/src/game/capsule.cpp +++ b/generated-src/capsule.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00945190 void Capsule::constructor(Vector *position, Vector *multiplier, float rotation, float size) diff --git a/src/game/card.cpp b/generated-src/card.cpp similarity index 98% rename from src/game/card.cpp rename to generated-src/card.cpp index 0a53138..9b8f48a 100644 --- a/src/game/card.cpp +++ b/generated-src/card.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 005b1530 byte Card::IsCard() diff --git a/src/game/cell_space.cpp b/generated-src/cell_space.cpp similarity index 99% rename from src/game/cell_space.cpp rename to generated-src/cell_space.cpp index 8319489..f18860c 100644 --- a/src/game/cell_space.cpp +++ b/generated-src/cell_space.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0041bb50 void CellSpace::insert(Entity *entity) diff --git a/src/game/challenge_param.cpp b/generated-src/challenge_param.cpp similarity index 98% rename from src/game/challenge_param.cpp rename to generated-src/challenge_param.cpp index 530e933..bfab120 100644 --- a/src/game/challenge_param.cpp +++ b/generated-src/challenge_param.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00424440 void ChallengeParam::Reset() diff --git a/src/game/challenge_params.cpp b/generated-src/challenge_params.cpp similarity index 99% rename from src/game/challenge_params.cpp rename to generated-src/challenge_params.cpp index 992398a..46c9136 100644 --- a/src/game/challenge_params.cpp +++ b/generated-src/challenge_params.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00424310 ChallengeParams::ChallengeParams() diff --git a/src/game/checksum.cpp b/generated-src/checksum.cpp similarity index 99% rename from src/game/checksum.cpp rename to generated-src/checksum.cpp index fc26ded..c6e2c33 100644 --- a/src/game/checksum.cpp +++ b/generated-src/checksum.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00683410 void Checksum::Update(byte *data, uint size) diff --git a/src/game/classes.hpp b/generated-src/classes.h similarity index 100% rename from src/game/classes.hpp rename to generated-src/classes.h diff --git a/src/game/color.cpp b/generated-src/color.cpp similarity index 99% rename from src/game/color.cpp rename to generated-src/color.cpp index 3b73137..bbd3ab8 100644 --- a/src/game/color.cpp +++ b/generated-src/color.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00407170 Color::Color() diff --git a/src/game/color_mod_state.cpp b/generated-src/color_mod_state.cpp similarity index 98% rename from src/game/color_mod_state.cpp rename to generated-src/color_mod_state.cpp index 952b3ca..c178249 100644 --- a/src/game/color_mod_state.cpp +++ b/generated-src/color_mod_state.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006ef410 void ColorModState::move_toward(float *target, float *step) diff --git a/src/game/color_quad.cpp b/generated-src/color_quad.cpp similarity index 99% rename from src/game/color_quad.cpp rename to generated-src/color_quad.cpp index 4c378f6..2c508ff 100644 --- a/src/game/color_quad.cpp +++ b/generated-src/color_quad.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a10c00 ColorQuad::ColorQuad(KColor *color) diff --git a/src/game/command_thread.cpp b/generated-src/command_thread.cpp similarity index 98% rename from src/game/command_thread.cpp rename to generated-src/command_thread.cpp index 526d5c2..8f956b8 100644 --- a/src/game/command_thread.cpp +++ b/generated-src/command_thread.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a73100 void CommandThread::post_command(void *command) diff --git a/src/game/completion_widget.cpp b/generated-src/completion_widget.cpp similarity index 99% rename from src/game/completion_widget.cpp rename to generated-src/completion_widget.cpp index 3fe2524..63a187a 100644 --- a/src/game/completion_widget.cpp +++ b/generated-src/completion_widget.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004252f0 void CompletionWidget::Render(Vector *pos, Vector *scale) diff --git a/src/game/config.cpp b/generated-src/config.cpp similarity index 98% rename from src/game/config.cpp rename to generated-src/config.cpp index dbd9401..cc05057 100644 --- a/src/game/config.cpp +++ b/generated-src/config.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0041e460 int Config::GetPillEffects() diff --git a/src/game/console.cpp b/generated-src/console.cpp similarity index 99% rename from src/game/console.cpp rename to generated-src/console.cpp index f062416..6c005c4 100644 --- a/src/game/console.cpp +++ b/generated-src/console.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00685fc0 void Console::destructor() diff --git a/src/game/cutscene.cpp b/generated-src/cutscene.cpp similarity index 99% rename from src/game/cutscene.cpp rename to generated-src/cutscene.cpp index 58654f8..11c22d9 100644 --- a/src/game/cutscene.cpp +++ b/generated-src/cutscene.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0095cc00 byte Cutscene::load_xml(byte *path) diff --git a/src/game/cutscene/anm2_part.cpp b/generated-src/cutscene/anm2_part.cpp similarity index 99% rename from src/game/cutscene/anm2_part.cpp rename to generated-src/cutscene/anm2_part.cpp index 8afc5ed..46e65f2 100644 --- a/src/game/cutscene/anm2_part.cpp +++ b/generated-src/cutscene/anm2_part.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0095f4f0 void Cutscene::ANM2Part::vfunc_3() diff --git a/src/game/cutscene/temporary_part.cpp b/generated-src/cutscene/temporary_part.cpp similarity index 99% rename from src/game/cutscene/temporary_part.cpp rename to generated-src/cutscene/temporary_part.cpp index 00eff63..3b81dbe 100644 --- a/src/game/cutscene/temporary_part.cpp +++ b/generated-src/cutscene/temporary_part.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0095fd70 void Cutscene::TemporaryPart::vfunc_1() diff --git a/src/game/cutscene_entry.cpp b/generated-src/cutscene_entry.cpp similarity index 99% rename from src/game/cutscene_entry.cpp rename to generated-src/cutscene_entry.cpp index 5291fff..da68035 100644 --- a/src/game/cutscene_entry.cpp +++ b/generated-src/cutscene_entry.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00960750 CutsceneEntry * CutsceneEntry::Constructor() diff --git a/src/game/cutscene_part.cpp b/generated-src/cutscene_part.cpp similarity index 99% rename from src/game/cutscene_part.cpp rename to generated-src/cutscene_part.cpp index 2c118c1..0b56224 100644 --- a/src/game/cutscene_part.cpp +++ b/generated-src/cutscene_part.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0095ed70 void CutscenePart::load_subtitles() diff --git a/src/game/daily_challenge.cpp b/generated-src/daily_challenge.cpp similarity index 99% rename from src/game/daily_challenge.cpp rename to generated-src/daily_challenge.cpp index eb910f4..a700344 100644 --- a/src/game/daily_challenge.cpp +++ b/generated-src/daily_challenge.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00426a50 void DailyChallenge::Init(uint dailyDate) diff --git a/src/game/damage_info.cpp b/generated-src/damage_info.cpp similarity index 97% rename from src/game/damage_info.cpp rename to generated-src/damage_info.cpp index 8bf0dc4..06ed892 100644 --- a/src/game/damage_info.cpp +++ b/generated-src/damage_info.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006a8190 DamageInfo::DamageInfo() diff --git a/src/game/date_time.cpp b/generated-src/date_time.cpp similarity index 99% rename from src/game/date_time.cpp rename to generated-src/date_time.cpp index 27994bf..10ca4d3 100644 --- a/src/game/date_time.cpp +++ b/generated-src/date_time.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0085af30 void DateTime::set_from_yyyymmdd(void *dateTime, int yyyymmdd) diff --git a/src/game/deathmatch_manager.cpp b/generated-src/deathmatch_manager.cpp similarity index 99% rename from src/game/deathmatch_manager.cpp rename to generated-src/deathmatch_manager.cpp index 0d957c1..ef2ae05 100644 --- a/src/game/deathmatch_manager.cpp +++ b/generated-src/deathmatch_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00429550 bool DeathmatchManager::is_active() diff --git a/src/game/deathmatch_type_base.cpp b/generated-src/deathmatch_type_base.cpp similarity index 99% rename from src/game/deathmatch_type_base.cpp rename to generated-src/deathmatch_type_base.cpp index 6619191..3190f41 100644 --- a/src/game/deathmatch_type_base.cpp +++ b/generated-src/deathmatch_type_base.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0042a4d0 byte DeathmatchTypeBase::Init() diff --git a/src/game/debug_renderer.cpp b/generated-src/debug_renderer.cpp similarity index 99% rename from src/game/debug_renderer.cpp rename to generated-src/debug_renderer.cpp index 14a2360..6bd7d6e 100644 --- a/src/game/debug_renderer.cpp +++ b/generated-src/debug_renderer.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0042dbb0 void DebugRenderer::Render() diff --git a/src/game/emote_wheel.cpp b/generated-src/emote_wheel.cpp similarity index 99% rename from src/game/emote_wheel.cpp rename to generated-src/emote_wheel.cpp index e81d56b..f392f3a 100644 --- a/src/game/emote_wheel.cpp +++ b/generated-src/emote_wheel.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008d1f20 void EmoteWheel::Update() diff --git a/src/game/entity.cpp b/generated-src/entity.cpp similarity index 99% rename from src/game/entity.cpp rename to generated-src/entity.cpp index 38ccff9..5929161 100644 --- a/src/game/entity.cpp +++ b/generated-src/entity.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00417220 byte Entity::IsType(int type, int variant, int subType) diff --git a/src/game/entity_bomb.cpp b/generated-src/entity_bomb.cpp similarity index 99% rename from src/game/entity_bomb.cpp rename to generated-src/entity_bomb.cpp index ce8f759..4f19470 100644 --- a/src/game/entity_bomb.cpp +++ b/generated-src/entity_bomb.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004316a0 byte Entity_Bomb::IsFetus() diff --git a/src/game/entity_config.cpp b/generated-src/entity_config.cpp similarity index 99% rename from src/game/entity_config.cpp rename to generated-src/entity_config.cpp index 3c42d5d..8bdd352 100644 --- a/src/game/entity_config.cpp +++ b/generated-src/entity_config.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00694680 uint EntityConfig::parse_entity_tags() diff --git a/src/game/entity_config_entity.cpp b/generated-src/entity_config_entity.cpp similarity index 99% rename from src/game/entity_config_entity.cpp rename to generated-src/entity_config_entity.cpp index b86cc5b..b2b5291 100644 --- a/src/game/entity_config_entity.cpp +++ b/generated-src/entity_config_entity.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00694230 EntityConfig_Entity::EntityConfig_Entity() diff --git a/src/game/entity_config_player.cpp b/generated-src/entity_config_player.cpp similarity index 99% rename from src/game/entity_config_player.cpp rename to generated-src/entity_config_player.cpp index b3c9194..9b80693 100644 --- a/src/game/entity_config_player.cpp +++ b/generated-src/entity_config_player.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00694490 EntityConfig_Player::EntityConfig_Player() diff --git a/src/game/entity_dummy.cpp b/generated-src/entity_dummy.cpp similarity index 98% rename from src/game/entity_dummy.cpp rename to generated-src/entity_dummy.cpp index 671c33b..82ddea1 100644 --- a/src/game/entity_dummy.cpp +++ b/generated-src/entity_dummy.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006a7f30 void Entity_Dummy::Update() diff --git a/src/game/entity_effect.cpp b/generated-src/entity_effect.cpp similarity index 99% rename from src/game/entity_effect.cpp rename to generated-src/entity_effect.cpp index 9cc0b75..8f4b3bd 100644 --- a/src/game/entity_effect.cpp +++ b/generated-src/entity_effect.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00435290 void Entity_Effect::render_player_target(Vector *offset, int segmentMode) diff --git a/src/game/entity_effect/extra_data_ref.cpp b/generated-src/entity_effect/extra_data_ref.cpp similarity index 98% rename from src/game/entity_effect/extra_data_ref.cpp rename to generated-src/entity_effect/extra_data_ref.cpp index 77d5428..1b39c4f 100644 --- a/src/game/entity_effect/extra_data_ref.cpp +++ b/generated-src/entity_effect/extra_data_ref.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0060c620 void Entity_Effect::ExtraDataRef::Set(void *extraData) diff --git a/src/game/entity_factory.cpp b/generated-src/entity_factory.cpp similarity index 99% rename from src/game/entity_factory.cpp rename to generated-src/entity_factory.cpp index e8d0731..a4b10eb 100644 --- a/src/game/entity_factory.cpp +++ b/generated-src/entity_factory.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006f0090 Entity * EntityFactory::Create(uint type, byte force) diff --git a/src/game/entity_familiar.cpp b/generated-src/entity_familiar.cpp similarity index 99% rename from src/game/entity_familiar.cpp rename to generated-src/entity_familiar.cpp index 72fa7bf..b4e7971 100644 --- a/src/game/entity_familiar.cpp +++ b/generated-src/entity_familiar.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00431be0 void Entity_Familiar::ai_umbilical_baby(byte isInterpolated) diff --git a/src/game/entity_knife.cpp b/generated-src/entity_knife.cpp similarity index 99% rename from src/game/entity_knife.cpp rename to generated-src/entity_knife.cpp index a6277d0..0d5531d 100644 --- a/src/game/entity_knife.cpp +++ b/generated-src/entity_knife.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004d7790 float10 Entity_Knife::Rotation() diff --git a/src/game/entity_laser.cpp b/generated-src/entity_laser.cpp similarity index 99% rename from src/game/entity_laser.cpp rename to generated-src/entity_laser.cpp index ec5c88c..22d17aa 100644 --- a/src/game/entity_laser.cpp +++ b/generated-src/entity_laser.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00435f20 void Entity_Laser::SetTimeout(int param_2) diff --git a/src/game/entity_list.cpp b/generated-src/entity_list.cpp similarity index 99% rename from src/game/entity_list.cpp rename to generated-src/entity_list.cpp index 642aa40..8af11be 100644 --- a/src/game/entity_list.cpp +++ b/generated-src/entity_list.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00417540 void EntityList::sublist_init(EntityList_EL *parent, int capacity) diff --git a/src/game/entity_list_el.cpp b/generated-src/entity_list_el.cpp similarity index 98% rename from src/game/entity_list_el.cpp rename to generated-src/entity_list_el.cpp index e3e75db..1407f9e 100644 --- a/src/game/entity_list_el.cpp +++ b/generated-src/entity_list_el.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00417510 void EntityList_EL::constructor(EntityList_EL *source) diff --git a/src/game/entity_list_query.cpp b/generated-src/entity_list_query.cpp similarity index 94% rename from src/game/entity_list_query.cpp rename to generated-src/entity_list_query.cpp index d22a972..6da9fcf 100644 --- a/src/game/entity_list_query.cpp +++ b/generated-src/entity_list_query.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004175b0 EntityList_Query::~EntityList_Query() diff --git a/src/game/entity_npc.cpp b/generated-src/entity_npc.cpp similarity index 99% rename from src/game/entity_npc.cpp rename to generated-src/entity_npc.cpp index 24abbf3..60158fa 100644 --- a/src/game/entity_npc.cpp +++ b/generated-src/entity_npc.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00447770 Entity_NPC * Entity_NPC::ParentNPC() diff --git a/src/game/entity_partition.cpp b/generated-src/entity_partition.cpp similarity index 99% rename from src/game/entity_partition.cpp rename to generated-src/entity_partition.cpp index 99a01ba..cc373ee 100644 --- a/src/game/entity_partition.cpp +++ b/generated-src/entity_partition.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0041c490 void EntityPartition::query_box(EntityList_EL *outList, Vector *position, Vector *extent) diff --git a/src/game/entity_pickup.cpp b/generated-src/entity_pickup.cpp similarity index 99% rename from src/game/entity_pickup.cpp rename to generated-src/entity_pickup.cpp index d090355..17fab31 100644 --- a/src/game/entity_pickup.cpp +++ b/generated-src/entity_pickup.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00431740 int Entity_Pickup::Price() diff --git a/src/game/entity_player.cpp b/generated-src/entity_player.cpp similarity index 99% rename from src/game/entity_player.cpp rename to generated-src/entity_player.cpp index 16b0b20..ae31900 100644 --- a/src/game/entity_player.cpp +++ b/generated-src/entity_player.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00417800 Entity_Player * Entity_Player::GetMainTwin() diff --git a/src/game/entity_projectile.cpp b/generated-src/entity_projectile.cpp similarity index 99% rename from src/game/entity_projectile.cpp rename to generated-src/entity_projectile.cpp index 4f6df98..088891c 100644 --- a/src/game/entity_projectile.cpp +++ b/generated-src/entity_projectile.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00417830 ulonglong Entity_Projectile::ProjectileFlags() diff --git a/src/game/entity_ptr.cpp b/generated-src/entity_ptr.cpp similarity index 98% rename from src/game/entity_ptr.cpp rename to generated-src/entity_ptr.cpp index f461cb5..5c4fb75 100644 --- a/src/game/entity_ptr.cpp +++ b/generated-src/entity_ptr.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0040c3a0 undefined4 EntityPtr::Ref() diff --git a/src/game/entity_ref.cpp b/generated-src/entity_ref.cpp similarity index 99% rename from src/game/entity_ref.cpp rename to generated-src/entity_ref.cpp index 649039c..31d97e4 100644 --- a/src/game/entity_ref.cpp +++ b/generated-src/entity_ref.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00431310 void EntityRef::constructor(Entity *entity) diff --git a/src/game/entity_save_state.cpp b/generated-src/entity_save_state.cpp similarity index 99% rename from src/game/entity_save_state.cpp rename to generated-src/entity_save_state.cpp index 4f301db..4035c2d 100644 --- a/src/game/entity_save_state.cpp +++ b/generated-src/entity_save_state.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004d3080 void EntitySaveState::constructor() diff --git a/src/game/entity_save_state_ref.cpp b/generated-src/entity_save_state_ref.cpp similarity index 98% rename from src/game/entity_save_state_ref.cpp rename to generated-src/entity_save_state_ref.cpp index 5bb3ba1..fb6180f 100644 --- a/src/game/entity_save_state_ref.cpp +++ b/generated-src/entity_save_state_ref.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006eee10 void EntitySaveStateRef::Set(void *state) diff --git a/src/game/entity_slot.cpp b/generated-src/entity_slot.cpp similarity index 99% rename from src/game/entity_slot.cpp rename to generated-src/entity_slot.cpp index 76bcb88..7c53926 100644 --- a/src/game/entity_slot.cpp +++ b/generated-src/entity_slot.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0065d950 void Entity_Slot::Update() diff --git a/src/game/entity_tear.cpp b/generated-src/entity_tear.cpp similarity index 99% rename from src/game/entity_tear.cpp rename to generated-src/entity_tear.cpp index f7249fd..cc8cab0 100644 --- a/src/game/entity_tear.cpp +++ b/generated-src/entity_tear.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004177c0 BitSet128 * Entity_Tear::TearFlags(BitSet128 *outFlags) diff --git a/src/game/entity_text.cpp b/generated-src/entity_text.cpp similarity index 99% rename from src/game/entity_text.cpp rename to generated-src/entity_text.cpp index 8dd69aa..45ec84d 100644 --- a/src/game/entity_text.cpp +++ b/generated-src/entity_text.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 005ccd80 void Entity_Text::Update() diff --git a/src/game/file_system.cpp b/generated-src/file_system.cpp similarity index 99% rename from src/game/file_system.cpp rename to generated-src/file_system.cpp index 9a18eba..ac32c15 100644 --- a/src/game/file_system.cpp +++ b/generated-src/file_system.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a16060 void * FileSystem::GetMountPrefixes(void *outPrefixes) diff --git a/src/game/font.cpp b/generated-src/font.cpp similarity index 99% rename from src/game/font.cpp rename to generated-src/font.cpp index 2353506..b3d7a2b 100644 --- a/src/game/font.cpp +++ b/generated-src/font.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00407280 void Font::SetLineHeightModifier(float modifier) diff --git a/src/game/font_settings.cpp b/generated-src/font_settings.cpp similarity index 93% rename from src/game/font_settings.cpp rename to generated-src/font_settings.cpp index 38ab8b2..d3dcf19 100644 --- a/src/game/font_settings.cpp +++ b/generated-src/font_settings.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a1a540 void FontSettings::constructor() diff --git a/src/game/formatted_text.cpp b/generated-src/formatted_text.cpp similarity index 99% rename from src/game/formatted_text.cpp rename to generated-src/formatted_text.cpp index 82ea8bf..bab6b59 100644 --- a/src/game/formatted_text.cpp +++ b/generated-src/formatted_text.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a55b70 FormattedText::FormattedText(undefined1 *param_1) diff --git a/src/game/frame_queue.cpp b/generated-src/frame_queue.cpp similarity index 99% rename from src/game/frame_queue.cpp rename to generated-src/frame_queue.cpp index 85eadd1..35b167b 100644 --- a/src/game/frame_queue.cpp +++ b/generated-src/frame_queue.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00aaa500 void FrameQueue::setSize(int count) diff --git a/src/game/friend_entry.cpp b/generated-src/friend_entry.cpp similarity index 97% rename from src/game/friend_entry.cpp rename to generated-src/friend_entry.cpp index 9d0f2f1..e21922e 100644 --- a/src/game/friend_entry.cpp +++ b/generated-src/friend_entry.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008e1f30 FriendEntry::~FriendEntry() diff --git a/src/game/fx_layer.cpp b/generated-src/fx_layer.cpp similarity index 99% rename from src/game/fx_layer.cpp rename to generated-src/fx_layer.cpp index 61ff132..6a14a18 100644 --- a/src/game/fx_layer.cpp +++ b/generated-src/fx_layer.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00997ef0 void * FXLayer::copy_constructor(void *other) diff --git a/src/game/fx_layers.cpp b/generated-src/fx_layers.cpp similarity index 99% rename from src/game/fx_layers.cpp rename to generated-src/fx_layers.cpp index 688d0a6..5311ff7 100644 --- a/src/game/fx_layers.cpp +++ b/generated-src/fx_layers.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0098f8c0 void FXLayers::destructor() diff --git a/src/game/fx_params.cpp b/generated-src/fx_params.cpp similarity index 99% rename from src/game/fx_params.cpp rename to generated-src/fx_params.cpp index c1e4fd9..aeaa5be 100644 --- a/src/game/fx_params.cpp +++ b/generated-src/fx_params.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0098f720 FXParams::FXParams() diff --git a/src/game/game.cpp b/generated-src/game.cpp similarity index 99% rename from src/game/game.cpp rename to generated-src/game.cpp index 826ecc0..4340ec2 100644 --- a/src/game/game.cpp +++ b/generated-src/game.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00407490 Vector * Game::ScreenShakeOffset() diff --git a/src/game/game_over.cpp b/generated-src/game_over.cpp similarity index 99% rename from src/game/game_over.cpp rename to generated-src/game_over.cpp index 75cf205..eeb9d10 100644 --- a/src/game/game_over.cpp +++ b/generated-src/game_over.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008ebfb0 void GameOver::RenderItemSprite(int memberIndex) diff --git a/src/game/game_state.cpp b/generated-src/game_state.cpp similarity index 99% rename from src/game/game_state.cpp rename to generated-src/game_state.cpp index 18b309e..1745bed 100644 --- a/src/game/game_state.cpp +++ b/generated-src/game_state.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006f8d60 RoomDescriptor * GameState::copy_room_list(RoomDescriptor *dest, RoomDescriptor *source) diff --git a/src/game/game_state_player.cpp b/generated-src/game_state_player.cpp similarity index 99% rename from src/game/game_state_player.cpp rename to generated-src/game_state_player.cpp index f05b1d2..bb8dfae 100644 --- a/src/game/game_state_player.cpp +++ b/generated-src/game_state_player.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00754d90 GameStatePlayer::~GameStatePlayer() diff --git a/src/game/game_state_slot.cpp b/generated-src/game_state_slot.cpp similarity index 99% rename from src/game/game_state_slot.cpp rename to generated-src/game_state_slot.cpp index fe696be..b28e6b3 100644 --- a/src/game/game_state_slot.cpp +++ b/generated-src/game_state_slot.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006f8a40 void * Game_StateSlot::operator_assign(void *other) diff --git a/src/game/generic_popup.cpp b/generated-src/generic_popup.cpp similarity index 99% rename from src/game/generic_popup.cpp rename to generated-src/generic_popup.cpp index 381fac1..2fecd32 100644 --- a/src/game/generic_popup.cpp +++ b/generated-src/generic_popup.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008372e0 void GenericPopup::Render() diff --git a/src/game/generic_prompt.cpp b/generated-src/generic_prompt.cpp similarity index 99% rename from src/game/generic_prompt.cpp rename to generated-src/generic_prompt.cpp index f485e45..54314f1 100644 --- a/src/game/generic_prompt.cpp +++ b/generated-src/generic_prompt.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008378e0 void GenericPrompt::Initialize(byte SmallPrompt) diff --git a/src/game/glitched_collectible_gfx.cpp b/generated-src/glitched_collectible_gfx.cpp similarity index 97% rename from src/game/glitched_collectible_gfx.cpp rename to generated-src/glitched_collectible_gfx.cpp index 3b403ab..07e8183 100644 --- a/src/game/glitched_collectible_gfx.cpp +++ b/generated-src/glitched_collectible_gfx.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009dc6e0 void * GlitchedCollectibleGfx::constructor() diff --git a/src/game/glitched_item_set.cpp b/generated-src/glitched_item_set.cpp similarity index 99% rename from src/game/glitched_item_set.cpp rename to generated-src/glitched_item_set.cpp index 716d8a7..c89e376 100644 --- a/src/game/glitched_item_set.cpp +++ b/generated-src/glitched_item_set.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009e0500 void GlitchedItemSet::recalculate() diff --git a/src/game/graphics_window.cpp b/generated-src/graphics_window.cpp similarity index 95% rename from src/game/graphics_window.cpp rename to generated-src/graphics_window.cpp index 2512350..78b00e9 100644 --- a/src/game/graphics_window.cpp +++ b/generated-src/graphics_window.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a19340 int GraphicsWindow::get_framebuffer_width() diff --git a/src/game/grid_entity.cpp b/generated-src/grid_entity.cpp similarity index 99% rename from src/game/grid_entity.cpp rename to generated-src/grid_entity.cpp index 0681cbe..ef541f2 100644 --- a/src/game/grid_entity.cpp +++ b/generated-src/grid_entity.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004073c0 int GridEntity::GetType() diff --git a/src/game/grid_entity_decoration.cpp b/generated-src/grid_entity_decoration.cpp similarity index 99% rename from src/game/grid_entity_decoration.cpp rename to generated-src/grid_entity_decoration.cpp index 86f38ed..49474f6 100644 --- a/src/game/grid_entity_decoration.cpp +++ b/generated-src/grid_entity_decoration.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0099a8e0 void GridEntity_Decoration::Update() diff --git a/src/game/grid_entity_door.cpp b/generated-src/grid_entity_door.cpp similarity index 99% rename from src/game/grid_entity_door.cpp rename to generated-src/grid_entity_door.cpp index 86fc8f7..053e65e 100644 --- a/src/game/grid_entity_door.cpp +++ b/generated-src/grid_entity_door.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00435fc0 byte GridEntity_Door::IsOpen() diff --git a/src/game/grid_entity_fire.cpp b/generated-src/grid_entity_fire.cpp similarity index 99% rename from src/game/grid_entity_fire.cpp rename to generated-src/grid_entity_fire.cpp index b87c32c..25c91f5 100644 --- a/src/game/grid_entity_fire.cpp +++ b/generated-src/grid_entity_fire.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0067db00 void GridEntity_Fire::BeginBatches() diff --git a/src/game/grid_entity_gravity.cpp b/generated-src/grid_entity_gravity.cpp similarity index 99% rename from src/game/grid_entity_gravity.cpp rename to generated-src/grid_entity_gravity.cpp index df389a0..f128451 100644 --- a/src/game/grid_entity_gravity.cpp +++ b/generated-src/grid_entity_gravity.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0099b510 void GridEntity_Gravity::BeginBatches() diff --git a/src/game/grid_entity_lock.cpp b/generated-src/grid_entity_lock.cpp similarity index 99% rename from src/game/grid_entity_lock.cpp rename to generated-src/grid_entity_lock.cpp index f4632ae..a971c1b 100644 --- a/src/game/grid_entity_lock.cpp +++ b/generated-src/grid_entity_lock.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00711780 void GridEntity_Lock::BeginBatches() diff --git a/src/game/grid_entity_pit.cpp b/generated-src/grid_entity_pit.cpp similarity index 99% rename from src/game/grid_entity_pit.cpp rename to generated-src/grid_entity_pit.cpp index 1fccb8a..e9a61d2 100644 --- a/src/game/grid_entity_pit.cpp +++ b/generated-src/grid_entity_pit.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00712180 void GridEntity_Pit::Update() diff --git a/src/game/grid_entity_poop.cpp b/generated-src/grid_entity_poop.cpp similarity index 99% rename from src/game/grid_entity_poop.cpp rename to generated-src/grid_entity_poop.cpp index baac8cf..572a90e 100644 --- a/src/game/grid_entity_poop.cpp +++ b/generated-src/grid_entity_poop.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00456870 void GridEntity_Poop::ReduceSpawnRate() diff --git a/src/game/grid_entity_pressure_plate.cpp b/generated-src/grid_entity_pressure_plate.cpp similarity index 99% rename from src/game/grid_entity_pressure_plate.cpp rename to generated-src/grid_entity_pressure_plate.cpp index 6d747a6..08efd46 100644 --- a/src/game/grid_entity_pressure_plate.cpp +++ b/generated-src/grid_entity_pressure_plate.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00983330 void GridEntity_PressurePlate::Update() diff --git a/src/game/grid_entity_rock.cpp b/generated-src/grid_entity_rock.cpp similarity index 99% rename from src/game/grid_entity_rock.cpp rename to generated-src/grid_entity_rock.cpp index 181f7ec..be63c3f 100644 --- a/src/game/grid_entity_rock.cpp +++ b/generated-src/grid_entity_rock.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 005cd820 byte * GridEntity_Rock::GetRubbleAnim() diff --git a/src/game/grid_entity_spikes.cpp b/generated-src/grid_entity_spikes.cpp similarity index 99% rename from src/game/grid_entity_spikes.cpp rename to generated-src/grid_entity_spikes.cpp index 94d45d2..247091b 100644 --- a/src/game/grid_entity_spikes.cpp +++ b/generated-src/grid_entity_spikes.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0071dfc0 void GridEntity_Spikes::BeginBatches() diff --git a/src/game/grid_entity_stairs.cpp b/generated-src/grid_entity_stairs.cpp similarity index 99% rename from src/game/grid_entity_stairs.cpp rename to generated-src/grid_entity_stairs.cpp index b757bc7..fbf6803 100644 --- a/src/game/grid_entity_stairs.cpp +++ b/generated-src/grid_entity_stairs.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0099bad0 void GridEntity_Stairs::BeginBatches() diff --git a/src/game/grid_entity_statue.cpp b/generated-src/grid_entity_statue.cpp similarity index 98% rename from src/game/grid_entity_statue.cpp rename to generated-src/grid_entity_statue.cpp index 232c0c4..d37625f 100644 --- a/src/game/grid_entity_statue.cpp +++ b/generated-src/grid_entity_statue.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0042cdf0 void GridEntity_Statue::Render() diff --git a/src/game/grid_entity_teleporter.cpp b/generated-src/grid_entity_teleporter.cpp similarity index 99% rename from src/game/grid_entity_teleporter.cpp rename to generated-src/grid_entity_teleporter.cpp index 3b7dddb..ea92516 100644 --- a/src/game/grid_entity_teleporter.cpp +++ b/generated-src/grid_entity_teleporter.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00838c30 void GridEntity_Teleporter::Update() diff --git a/src/game/grid_entity_tnt.cpp b/generated-src/grid_entity_tnt.cpp similarity index 99% rename from src/game/grid_entity_tnt.cpp rename to generated-src/grid_entity_tnt.cpp index fefdaa5..229ea72 100644 --- a/src/game/grid_entity_tnt.cpp +++ b/generated-src/grid_entity_tnt.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0071ee90 void GridEntity_TNT::BeginBatches() diff --git a/src/game/grid_entity_trap_door.cpp b/generated-src/grid_entity_trap_door.cpp similarity index 99% rename from src/game/grid_entity_trap_door.cpp rename to generated-src/grid_entity_trap_door.cpp index 3b63af1..1372c80 100644 --- a/src/game/grid_entity_trap_door.cpp +++ b/generated-src/grid_entity_trap_door.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0071f630 void GridEntity_TrapDoor::BeginBatches() diff --git a/src/game/grid_entity_wall.cpp b/generated-src/grid_entity_wall.cpp similarity index 99% rename from src/game/grid_entity_wall.cpp rename to generated-src/grid_entity_wall.cpp index d0ea486..e5ef6cc 100644 --- a/src/game/grid_entity_wall.cpp +++ b/generated-src/grid_entity_wall.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 007210d0 void GridEntity_Wall::BeginBatches() diff --git a/src/game/grid_entity_web.cpp b/generated-src/grid_entity_web.cpp similarity index 99% rename from src/game/grid_entity_web.cpp rename to generated-src/grid_entity_web.cpp index e3030ce..1adfd38 100644 --- a/src/game/grid_entity_web.cpp +++ b/generated-src/grid_entity_web.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00721540 void GridEntity_Web::BeginBatches() diff --git a/src/game/hallucination_overlay.cpp b/generated-src/hallucination_overlay.cpp similarity index 99% rename from src/game/hallucination_overlay.cpp rename to generated-src/hallucination_overlay.cpp index 3d29dc8..f161db7 100644 --- a/src/game/hallucination_overlay.cpp +++ b/generated-src/hallucination_overlay.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00839550 void HallucinationOverlay::Render(Vector *offset) diff --git a/src/game/history.cpp b/generated-src/history.cpp similarity index 99% rename from src/game/history.cpp rename to generated-src/history.cpp index 777ee8c..b85c423 100644 --- a/src/game/history.cpp +++ b/generated-src/history.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00721a70 void History::AddHistoryItem(void *historyItem) diff --git a/src/game/homing_laser.cpp b/generated-src/homing_laser.cpp similarity index 99% rename from src/game/homing_laser.cpp rename to generated-src/homing_laser.cpp index 69a4118..c7f7780 100644 --- a/src/game/homing_laser.cpp +++ b/generated-src/homing_laser.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0085e000 HomingLaser * HomingLaser::operator_assign(HomingLaser *other) diff --git a/src/game/hud.cpp b/generated-src/hud.cpp similarity index 99% rename from src/game/hud.cpp rename to generated-src/hud.cpp index 5c0513a..f9a825e 100644 --- a/src/game/hud.cpp +++ b/generated-src/hud.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004aaee0 void HUD::SetVisible(byte param_2) diff --git a/src/game/hud_message.cpp b/generated-src/hud_message.cpp similarity index 99% rename from src/game/hud_message.cpp rename to generated-src/hud_message.cpp index 1988ed9..2d5c1d4 100644 --- a/src/game/hud_message.cpp +++ b/generated-src/hud_message.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00840670 HUD_Message::~HUD_Message() diff --git a/src/game/image_base.cpp b/generated-src/image_base.cpp similarity index 98% rename from src/game/image_base.cpp rename to generated-src/image_base.cpp index 48f17d4..4fb34c1 100644 --- a/src/game/image_base.cpp +++ b/generated-src/image_base.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a12d50 byte ImageBase::set_size(uint width, uint height, int unused) diff --git a/src/game/image_png.cpp b/generated-src/image_png.cpp similarity index 99% rename from src/game/image_png.cpp rename to generated-src/image_png.cpp index db9be46..d60fac4 100644 --- a/src/game/image_png.cpp +++ b/generated-src/image_png.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a64a50 byte ImagePng::load(void *stream, byte *path) diff --git a/src/game/info_display.cpp b/generated-src/info_display.cpp similarity index 99% rename from src/game/info_display.cpp rename to generated-src/info_display.cpp index c17f7ad..65d01c8 100644 --- a/src/game/info_display.cpp +++ b/generated-src/info_display.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0084eba0 void InfoDisplay::load_xml(byte *path, void *modEntry) diff --git a/src/game/info_display_config.cpp b/generated-src/info_display_config.cpp similarity index 99% rename from src/game/info_display_config.cpp rename to generated-src/info_display_config.cpp index 74cc1ea..5d48182 100644 --- a/src/game/info_display_config.cpp +++ b/generated-src/info_display_config.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00854940 void InfoDisplayConfig::parse_item_node(void *groupNode) diff --git a/src/game/info_display_entry.cpp b/generated-src/info_display_entry.cpp similarity index 99% rename from src/game/info_display_entry.cpp rename to generated-src/info_display_entry.cpp index a7e8b6f..1bae2d2 100644 --- a/src/game/info_display_entry.cpp +++ b/generated-src/info_display_entry.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0084dad0 InfoDisplayEntry::InfoDisplayEntry() diff --git a/src/game/info_display_item.cpp b/generated-src/info_display_item.cpp similarity index 99% rename from src/game/info_display_item.cpp rename to generated-src/info_display_item.cpp index 3304823..ec5435e 100644 --- a/src/game/info_display_item.cpp +++ b/generated-src/info_display_item.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0084e5b0 byte InfoDisplayItem::is_line_visible(int lineIndex, Entity_Player *player, uint flags) diff --git a/src/game/info_display_text.cpp b/generated-src/info_display_text.cpp similarity index 98% rename from src/game/info_display_text.cpp rename to generated-src/info_display_text.cpp index 1eb256b..495bfa2 100644 --- a/src/game/info_display_text.cpp +++ b/generated-src/info_display_text.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0084da20 void * InfoDisplayText::constructor() diff --git a/src/game/input_manager.cpp b/generated-src/input_manager.cpp similarity index 99% rename from src/game/input_manager.cpp rename to generated-src/input_manager.cpp index 7d86434..4f2dd60 100644 --- a/src/game/input_manager.cpp +++ b/generated-src/input_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0090ac70 void * InputManager::GetDeviceByPlayerEntity(Entity_Player *player) diff --git a/src/game/invite_friends_menu.cpp b/generated-src/invite_friends_menu.cpp similarity index 99% rename from src/game/invite_friends_menu.cpp rename to generated-src/invite_friends_menu.cpp index 0fe305d..4a690b7 100644 --- a/src/game/invite_friends_menu.cpp +++ b/generated-src/invite_friends_menu.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009c4100 void InviteFriendsMenu::load_graphics() diff --git a/src/game/isaac_repentance_plus/weapon.cpp b/generated-src/isaac_repentance_plus/weapon.cpp similarity index 98% rename from src/game/isaac_repentance_plus/weapon.cpp rename to generated-src/isaac_repentance_plus/weapon.cpp index b8ed76e..50359d0 100644 --- a/src/game/isaac_repentance_plus/weapon.cpp +++ b/generated-src/isaac_repentance_plus/weapon.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009f3290 IsaacRepentancePlus::Weapon::~Weapon() diff --git a/src/game/item.cpp b/generated-src/item.cpp similarity index 97% rename from src/game/item.cpp rename to generated-src/item.cpp index 2c69047..f562256 100644 --- a/src/game/item.cpp +++ b/generated-src/item.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 005b14e0 byte Item::IsCollectible() diff --git a/src/game/item_config.cpp b/generated-src/item_config.cpp similarity index 99% rename from src/game/item_config.cpp rename to generated-src/item_config.cpp index 5b698b7..26d428c 100644 --- a/src/game/item_config.cpp +++ b/generated-src/item_config.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004362a0 void * ItemConfig::get_wisp_config(int collectibleId) diff --git a/src/game/item_config_card.cpp b/generated-src/item_config_card.cpp similarity index 98% rename from src/game/item_config_card.cpp rename to generated-src/item_config_card.cpp index 5f09c02..b446ed2 100644 --- a/src/game/item_config_card.cpp +++ b/generated-src/item_config_card.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00724bd0 std_string * ItemConfig_Card::get_display_desc(std_string *outDescription, int unused) diff --git a/src/game/item_config_costume.cpp b/generated-src/item_config_costume.cpp similarity index 97% rename from src/game/item_config_costume.cpp rename to generated-src/item_config_costume.cpp index df717fd..faf0839 100644 --- a/src/game/item_config_costume.cpp +++ b/generated-src/item_config_costume.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00728710 ItemConfig_Costume * ItemConfig_Costume::operator_assign(ItemConfig_Costume *other) diff --git a/src/game/item_config_item.cpp b/generated-src/item_config_item.cpp similarity index 99% rename from src/game/item_config_item.cpp rename to generated-src/item_config_item.cpp index 80b424a..82c1dd0 100644 --- a/src/game/item_config_item.cpp +++ b/generated-src/item_config_item.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00722a80 ItemConfig_Item::ItemConfig_Item() diff --git a/src/game/item_overlay.cpp b/generated-src/item_overlay.cpp similarity index 99% rename from src/game/item_overlay.cpp rename to generated-src/item_overlay.cpp index b3f21b8..bf015a5 100644 --- a/src/game/item_overlay.cpp +++ b/generated-src/item_overlay.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009abd80 ItemOverlay::~ItemOverlay() diff --git a/src/game/item_pool.cpp b/generated-src/item_pool.cpp similarity index 99% rename from src/game/item_pool.cpp rename to generated-src/item_pool.cpp index e2f7ab5..b3aaa2a 100644 --- a/src/game/item_pool.cpp +++ b/generated-src/item_pool.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0042b560 void ItemPool::ReplaceBlacklistedPickup(int *param_2, uint *param_3, uint *param_4) diff --git a/src/game/k_color.cpp b/generated-src/k_color.cpp similarity index 99% rename from src/game/k_color.cpp rename to generated-src/k_color.cpp index 6fec2a1..fcd4ff9 100644 --- a/src/game/k_color.cpp +++ b/generated-src/k_color.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00682f50 void KColor::FromRGBA255(int red, int green, int blue, int alpha) diff --git a/src/game/kage/eos_manager.cpp b/generated-src/kage/eos_manager.cpp similarity index 99% rename from src/game/kage/eos_manager.cpp rename to generated-src/kage/eos_manager.cpp index 8ce2edc..a4ba879 100644 --- a/src/game/kage/eos_manager.cpp +++ b/generated-src/kage/eos_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a5f770 undefined1 KAGE::EosManager::FUN_00a649b0() diff --git a/src/game/kage/filesys/archived_file.cpp b/generated-src/kage/filesys/archived_file.cpp similarity index 99% rename from src/game/kage/filesys/archived_file.cpp rename to generated-src/kage/filesys/archived_file.cpp index c0ffcc6..9ba42e6 100644 --- a/src/game/kage/filesys/archived_file.cpp +++ b/generated-src/kage/filesys/archived_file.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a68cf0 void KAGE::Filesys::ArchivedFile::refill_buffer() diff --git a/src/game/kage/filesys/buffered_stream.cpp b/generated-src/kage/filesys/buffered_stream.cpp similarity index 99% rename from src/game/kage/filesys/buffered_stream.cpp rename to generated-src/kage/filesys/buffered_stream.cpp index f9e1178..55a4c4d 100644 --- a/src/game/kage/filesys/buffered_stream.cpp +++ b/generated-src/kage/filesys/buffered_stream.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0090d360 void * KAGE::Filesys::BufferedStream::operator_assign(void *other) diff --git a/src/game/kage/filesys/file_map.cpp b/generated-src/kage/filesys/file_map.cpp similarity index 99% rename from src/game/kage/filesys/file_map.cpp rename to generated-src/kage/filesys/file_map.cpp index 79ae7e7..ea5ad6f 100644 --- a/src/game/kage/filesys/file_map.cpp +++ b/generated-src/kage/filesys/file_map.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a687f0 void KAGE::Filesys::FileMap::scan_directory(byte *param_1, byte *param_2) diff --git a/src/game/kage/graphics/graphics_buffer_object.cpp b/generated-src/kage/graphics/graphics_buffer_object.cpp similarity index 98% rename from src/game/kage/graphics/graphics_buffer_object.cpp rename to generated-src/kage/graphics/graphics_buffer_object.cpp index a9b37df..162fa90 100644 --- a/src/game/kage/graphics/graphics_buffer_object.cpp +++ b/generated-src/kage/graphics/graphics_buffer_object.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a67fe0 KAGE::Graphics::GraphicsBufferObject::GraphicsBufferObject() diff --git a/src/game/kage/graphics/image_base.cpp b/generated-src/kage/graphics/image_base.cpp similarity index 98% rename from src/game/kage/graphics/image_base.cpp rename to generated-src/kage/graphics/image_base.cpp index 50c1c5e..a044b94 100644 --- a/src/game/kage/graphics/image_base.cpp +++ b/generated-src/kage/graphics/image_base.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a12430 void KAGE::Graphics::ImageBase::set_palette(undefined4 param_1, uint param_2) diff --git a/src/game/kage/graphics/manager.cpp b/generated-src/kage/graphics/manager.cpp similarity index 99% rename from src/game/kage/graphics/manager.cpp rename to generated-src/kage/graphics/manager.cpp index 00ae68c..fce76a1 100644 --- a/src/game/kage/graphics/manager.cpp +++ b/generated-src/kage/graphics/manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a18aa0 KAGE::Graphics::Manager::Manager() diff --git a/src/game/kage/graphics/shader_base.cpp b/generated-src/kage/graphics/shader_base.cpp similarity index 99% rename from src/game/kage/graphics/shader_base.cpp rename to generated-src/kage/graphics/shader_base.cpp index 42f8776..2a68616 100644 --- a/src/game/kage/graphics/shader_base.cpp +++ b/generated-src/kage/graphics/shader_base.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a149a0 void KAGE::Graphics::ShaderBase::free_uniforms() diff --git a/src/game/kage/input/input_device.cpp b/generated-src/kage/input/input_device.cpp similarity index 99% rename from src/game/kage/input/input_device.cpp rename to generated-src/kage/input/input_device.cpp index 269bd82..8aeeb02 100644 --- a/src/game/kage/input/input_device.cpp +++ b/generated-src/kage/input/input_device.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a1f280 byte KAGE::Input::InputDevice::update() diff --git a/src/game/kage/input/input_device_gamepad.cpp b/generated-src/kage/input/input_device_gamepad.cpp similarity index 99% rename from src/game/kage/input/input_device_gamepad.cpp rename to generated-src/kage/input/input_device_gamepad.cpp index 2511f2e..806baa2 100644 --- a/src/game/kage/input/input_device_gamepad.cpp +++ b/generated-src/kage/input/input_device_gamepad.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a22940 void KAGE::Input::InputDeviceGamepad::vfunc_30() diff --git a/src/game/kage/input/input_device_keyboard.cpp b/generated-src/kage/input/input_device_keyboard.cpp similarity index 99% rename from src/game/kage/input/input_device_keyboard.cpp rename to generated-src/kage/input/input_device_keyboard.cpp index 95c9612..c7982ad 100644 --- a/src/game/kage/input/input_device_keyboard.cpp +++ b/generated-src/kage/input/input_device_keyboard.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a6c650 void KAGE::Input::InputDeviceKeyboard::vfunc_30() diff --git a/src/game/kage/network/multiplayer/connection_base.cpp b/generated-src/kage/network/multiplayer/connection_base.cpp similarity index 99% rename from src/game/kage/network/multiplayer/connection_base.cpp rename to generated-src/kage/network/multiplayer/connection_base.cpp index c7f8b9b..cb02302 100644 --- a/src/game/kage/network/multiplayer/connection_base.cpp +++ b/generated-src/kage/network/multiplayer/connection_base.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a588c0 void KAGE::Network::Multiplayer::ConnectionBase::Update() diff --git a/src/game/kage/network/multiplayer/const_lobby.cpp b/generated-src/kage/network/multiplayer/const_lobby.cpp similarity index 98% rename from src/game/kage/network/multiplayer/const_lobby.cpp rename to generated-src/kage/network/multiplayer/const_lobby.cpp index 66d1968..8f50eca 100644 --- a/src/game/kage/network/multiplayer/const_lobby.cpp +++ b/generated-src/kage/network/multiplayer/const_lobby.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a28360 KAGE::Network::Multiplayer::ConstLobby::ConstLobby(void *lobbyPtr, void *lobbyCtrl) diff --git a/src/game/kage/network/multiplayer/lobby.cpp b/generated-src/kage/network/multiplayer/lobby.cpp similarity index 99% rename from src/game/kage/network/multiplayer/lobby.cpp rename to generated-src/kage/network/multiplayer/lobby.cpp index ad568cb..bdaa216 100644 --- a/src/game/kage/network/multiplayer/lobby.cpp +++ b/generated-src/kage/network/multiplayer/lobby.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a284d0 void * KAGE::Network::Multiplayer::Lobby::get_member(void *outProfile, uint index) diff --git a/src/game/kage/network/multiplayer/lobby_localhost.cpp b/generated-src/kage/network/multiplayer/lobby_localhost.cpp similarity index 99% rename from src/game/kage/network/multiplayer/lobby_localhost.cpp rename to generated-src/kage/network/multiplayer/lobby_localhost.cpp index a4ae6ba..0175160 100644 --- a/src/game/kage/network/multiplayer/lobby_localhost.cpp +++ b/generated-src/kage/network/multiplayer/lobby_localhost.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a9ede0 void KAGE::Network::Multiplayer::LobbyLocalhost::add_member(ulonglong *param_1) diff --git a/src/game/kage/network/multiplayer/lobby_steam.cpp b/generated-src/kage/network/multiplayer/lobby_steam.cpp similarity index 99% rename from src/game/kage/network/multiplayer/lobby_steam.cpp rename to generated-src/kage/network/multiplayer/lobby_steam.cpp index 48a472b..e901192 100644 --- a/src/game/kage/network/multiplayer/lobby_steam.cpp +++ b/generated-src/kage/network/multiplayer/lobby_steam.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a52940 byte KAGE::Network::Multiplayer::LobbySteam::request_lobby_data(void *callback, void *userData) diff --git a/src/game/kage/network/multiplayer/service_base.cpp b/generated-src/kage/network/multiplayer/service_base.cpp similarity index 99% rename from src/game/kage/network/multiplayer/service_base.cpp rename to generated-src/kage/network/multiplayer/service_base.cpp index 791e248..e595d96 100644 --- a/src/game/kage/network/multiplayer/service_base.cpp +++ b/generated-src/kage/network/multiplayer/service_base.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a77bf0 KAGE::Network::Multiplayer::ServiceBase::ServiceBase() diff --git a/src/game/kage/network/multiplayer/service_eos.cpp b/generated-src/kage/network/multiplayer/service_eos.cpp similarity index 99% rename from src/game/kage/network/multiplayer/service_eos.cpp rename to generated-src/kage/network/multiplayer/service_eos.cpp index 659227c..9172bc4 100644 --- a/src/game/kage/network/multiplayer/service_eos.cpp +++ b/generated-src/kage/network/multiplayer/service_eos.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a76a20 void KAGE::Network::Multiplayer::ServiceEOS::on_create_lobby_complete(int *param_1) diff --git a/src/game/kage/network/multiplayer/service_localhost.cpp b/generated-src/kage/network/multiplayer/service_localhost.cpp similarity index 99% rename from src/game/kage/network/multiplayer/service_localhost.cpp rename to generated-src/kage/network/multiplayer/service_localhost.cpp index 2bca2ce..4850150 100644 --- a/src/game/kage/network/multiplayer/service_localhost.cpp +++ b/generated-src/kage/network/multiplayer/service_localhost.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a73b60 void KAGE::Network::Multiplayer::ServiceLocalhost::FUN_00a77f70() diff --git a/src/game/kage/network/multiplayer_manager.cpp b/generated-src/kage/network/multiplayer_manager.cpp similarity index 99% rename from src/game/kage/network/multiplayer_manager.cpp rename to generated-src/kage/network/multiplayer_manager.cpp index 1fe7bba..b1db492 100644 --- a/src/game/kage/network/multiplayer_manager.cpp +++ b/generated-src/kage/network/multiplayer_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a289d0 undefined * KAGE::Network::MultiplayerManager::dynamic_initializer() diff --git a/src/game/kage/smart_pointer.cpp b/generated-src/kage/smart_pointer.cpp similarity index 99% rename from src/game/kage/smart_pointer.cpp rename to generated-src/kage/smart_pointer.cpp index 362aa53..c4e79b9 100644 --- a/src/game/kage/smart_pointer.cpp +++ b/generated-src/kage/smart_pointer.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0040c3b0 void * KAGE::SmartPointer::operator_assign(void *other) diff --git a/src/game/kage/sound/manager.cpp b/generated-src/kage/sound/manager.cpp similarity index 98% rename from src/game/kage/sound/manager.cpp rename to generated-src/kage/sound/manager.cpp index 014ed44..d7e157f 100644 --- a/src/game/kage/sound/manager.cpp +++ b/generated-src/kage/sound/manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a9e4f0 byte KAGE::Sound::Manager::Init() diff --git a/src/game/kage/sound/manager_open_al.cpp b/generated-src/kage/sound/manager_open_al.cpp similarity index 99% rename from src/game/kage/sound/manager_open_al.cpp rename to generated-src/kage/sound/manager_open_al.cpp index 8ab863b..02cf7fb 100644 --- a/src/game/kage/sound/manager_open_al.cpp +++ b/generated-src/kage/sound/manager_open_al.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a7d2a0 undefined1 KAGE::Sound::ManagerOpenAL::FUN_00a649b0() diff --git a/src/game/kage/system/friend_manager.cpp b/generated-src/kage/system/friend_manager.cpp similarity index 99% rename from src/game/kage/system/friend_manager.cpp rename to generated-src/kage/system/friend_manager.cpp index ea7c932..d5ff96d 100644 --- a/src/game/kage/system/friend_manager.cpp +++ b/generated-src/kage/system/friend_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a57060 undefined4 KAGE::System::FriendManager::request_friend_lobbies(int param_1, int param_2) diff --git a/src/game/kage/system/leaderboard_manager.cpp b/generated-src/kage/system/leaderboard_manager.cpp similarity index 99% rename from src/game/kage/system/leaderboard_manager.cpp rename to generated-src/kage/system/leaderboard_manager.cpp index f062eee..0726847 100644 --- a/src/game/kage/system/leaderboard_manager.cpp +++ b/generated-src/kage/system/leaderboard_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a51790 int KAGE::System::LeaderboardManager::get_result(uint handle) diff --git a/src/game/kage/system/user_profile.cpp b/generated-src/kage/system/user_profile.cpp similarity index 99% rename from src/game/kage/system/user_profile.cpp rename to generated-src/kage/system/user_profile.cpp index 96c34a7..b4a8c40 100644 --- a/src/game/kage/system/user_profile.cpp +++ b/generated-src/kage/system/user_profile.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a23610 void KAGE::System::UserProfile::load_steam_avatar() diff --git a/src/game/kage_filesys_file_manager.cpp b/generated-src/kage_filesys_file_manager.cpp similarity index 99% rename from src/game/kage_filesys_file_manager.cpp rename to generated-src/kage_filesys_file_manager.cpp index b2873e9..d353677 100644 --- a/src/game/kage_filesys_file_manager.cpp +++ b/generated-src/kage_filesys_file_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 005ca5a0 bool KAGE_Filesys_FileManager::OpenRead(int param_2, int param_3) diff --git a/src/game/kage_graphics.cpp b/generated-src/kage_graphics.cpp similarity index 99% rename from src/game/kage_graphics.cpp rename to generated-src/kage_graphics.cpp index 33e609f..59c47a6 100644 --- a/src/game/kage_graphics.cpp +++ b/generated-src/kage_graphics.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a11c70 void * KAGE_Graphics::create_image(void *outImage, int width, int height, int format, byte *name) diff --git a/src/game/kage_graphics_image_manager.cpp b/generated-src/kage_graphics_image_manager.cpp similarity index 99% rename from src/game/kage_graphics_image_manager.cpp rename to generated-src/kage_graphics_image_manager.cpp index 09aeebc..45116d9 100644 --- a/src/game/kage_graphics_image_manager.cpp +++ b/generated-src/kage_graphics_image_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a118d0 void * KAGE_Graphics_ImageManager::load_image_file(void *param_1, byte *param_2) diff --git a/src/game/key_configs.cpp b/generated-src/key_configs.cpp similarity index 99% rename from src/game/key_configs.cpp rename to generated-src/key_configs.cpp index da198cd..bcec278 100644 --- a/src/game/key_configs.cpp +++ b/generated-src/key_configs.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00835c90 void KeyConfigs::apply_to_device(int deviceId) diff --git a/src/game/l_room_tile_desc.cpp b/generated-src/l_room_tile_desc.cpp similarity index 99% rename from src/game/l_room_tile_desc.cpp rename to generated-src/l_room_tile_desc.cpp index 84fa0cf..9fe08bb 100644 --- a/src/game/l_room_tile_desc.cpp +++ b/generated-src/l_room_tile_desc.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0081fb70 void * LRoomTileDesc::GetRandomTile(void *ret, uint seed) diff --git a/src/game/layer_animation.cpp b/generated-src/layer_animation.cpp similarity index 93% rename from src/game/layer_animation.cpp rename to generated-src/layer_animation.cpp index b5e4195..1cbe44b 100644 --- a/src/game/layer_animation.cpp +++ b/generated-src/layer_animation.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0040c1e0 LayerAnimation::LayerAnimation() diff --git a/src/game/layer_state.cpp b/generated-src/layer_state.cpp similarity index 99% rename from src/game/layer_state.cpp rename to generated-src/layer_state.cpp index 2f479d5..be88c10 100644 --- a/src/game/layer_state.cpp +++ b/generated-src/layer_state.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00407a60 LayerState::~LayerState() diff --git a/src/game/leaderboard.cpp b/generated-src/leaderboard.cpp similarity index 99% rename from src/game/leaderboard.cpp rename to generated-src/leaderboard.cpp index 64d8daa..c633cf6 100644 --- a/src/game/leaderboard.cpp +++ b/generated-src/leaderboard.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00856f70 void Leaderboard::constructor() diff --git a/src/game/level.cpp b/generated-src/level.cpp similarity index 99% rename from src/game/level.cpp rename to generated-src/level.cpp index 33a5850..0f6fb40 100644 --- a/src/game/level.cpp +++ b/generated-src/level.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00407480 void * Level::GetCurrentRoom() diff --git a/src/game/level_generator.cpp b/generated-src/level_generator.cpp similarity index 99% rename from src/game/level_generator.cpp rename to generated-src/level_generator.cpp index 6a7dede..60461ea 100644 --- a/src/game/level_generator.cpp +++ b/generated-src/level_generator.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009addf0 byte LevelGenerator::try_add_dead_end(int unused, void *excludedGridIndices) diff --git a/src/game/level_generator_room.cpp b/generated-src/level_generator_room.cpp similarity index 99% rename from src/game/level_generator_room.cpp rename to generated-src/level_generator_room.cpp index e9d4522..91a3beb 100644 --- a/src/game/level_generator_room.cpp +++ b/generated-src/level_generator_room.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 007381b0 LevelGenerator_Room * LevelGenerator_Room::constructor(uint column, uint line, uint shape) diff --git a/src/game/lobby.cpp b/generated-src/lobby.cpp similarity index 99% rename from src/game/lobby.cpp rename to generated-src/lobby.cpp index 635945e..35b2728 100644 --- a/src/game/lobby.cpp +++ b/generated-src/lobby.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a71c40 void Lobby::refresh_members() diff --git a/src/game/lobby_list.cpp b/generated-src/lobby_list.cpp similarity index 97% rename from src/game/lobby_list.cpp rename to generated-src/lobby_list.cpp index 63115ee..09e86e4 100644 --- a/src/game/lobby_list.cpp +++ b/generated-src/lobby_list.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0091e730 void LobbyList::clear() diff --git a/src/game/lobby_localhost.cpp b/generated-src/lobby_localhost.cpp similarity index 99% rename from src/game/lobby_localhost.cpp rename to generated-src/lobby_localhost.cpp index adc943e..edfac55 100644 --- a/src/game/lobby_localhost.cpp +++ b/generated-src/lobby_localhost.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a9f2b0 void LobbyLocalhost::read_welcome_message(void *data) diff --git a/src/game/lobby_password_prompt.cpp b/generated-src/lobby_password_prompt.cpp similarity index 99% rename from src/game/lobby_password_prompt.cpp rename to generated-src/lobby_password_prompt.cpp index 466074a..458d3b3 100644 --- a/src/game/lobby_password_prompt.cpp +++ b/generated-src/lobby_password_prompt.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009c61e0 void LobbyPasswordPrompt::open(undefined4 param_1, undefined1 param_2, int *param_3) diff --git a/src/game/lobby_settings.cpp b/generated-src/lobby_settings.cpp similarity index 98% rename from src/game/lobby_settings.cpp rename to generated-src/lobby_settings.cpp index 75422d8..262c158 100644 --- a/src/game/lobby_settings.cpp +++ b/generated-src/lobby_settings.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0085b050 void LobbySettings::reset() diff --git a/src/game/loot_list.cpp b/generated-src/loot_list.cpp similarity index 99% rename from src/game/loot_list.cpp rename to generated-src/loot_list.cpp index fe782f8..48db7a1 100644 --- a/src/game/loot_list.cpp +++ b/generated-src/loot_list.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006c20e0 LootList::LootList(void *other) diff --git a/src/game/lua_engine.cpp b/generated-src/lua_engine.cpp similarity index 99% rename from src/game/lua_engine.cpp rename to generated-src/lua_engine.cpp index d8d9ce3..26a9786 100644 --- a/src/game/lua_engine.cpp +++ b/generated-src/lua_engine.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 007a23a0 void LuaEngine::RunScript(int param_2, char param_3) diff --git a/src/game/lua_ref.cpp b/generated-src/lua_ref.cpp similarity index 97% rename from src/game/lua_ref.cpp rename to generated-src/lua_ref.cpp index ff87d46..edc09e7 100644 --- a/src/game/lua_ref.cpp +++ b/generated-src/lua_ref.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006a80f0 void LuaRef::push(void *luaState) diff --git a/src/game/manager.cpp b/generated-src/manager.cpp similarity index 99% rename from src/game/manager.cpp rename to generated-src/manager.cpp index 16ef8a0..fe3ab6a 100644 --- a/src/game/manager.cpp +++ b/generated-src/manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006fa540 void Manager::update_ingame_input() diff --git a/src/game/mem_map_base.cpp b/generated-src/mem_map_base.cpp similarity index 90% rename from src/game/mem_map_base.cpp rename to generated-src/mem_map_base.cpp index 56e9ac3..2e85d3f 100644 --- a/src/game/mem_map_base.cpp +++ b/generated-src/mem_map_base.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008baea0 void * MemMapBase::_scalar_deleting_destructor_(uint param_1) diff --git a/src/game/menu_bestiary.cpp b/generated-src/menu_bestiary.cpp similarity index 99% rename from src/game/menu_bestiary.cpp rename to generated-src/menu_bestiary.cpp index 2a50edb..965b441 100644 --- a/src/game/menu_bestiary.cpp +++ b/generated-src/menu_bestiary.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008c6240 void Menu_Bestiary::load_graphics() diff --git a/src/game/menu_challenge.cpp b/generated-src/menu_challenge.cpp similarity index 99% rename from src/game/menu_challenge.cpp rename to generated-src/menu_challenge.cpp index 4e36ce7..df32ecb 100644 --- a/src/game/menu_challenge.cpp +++ b/generated-src/menu_challenge.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008cd7b0 void Menu_Challenge::render_seed_text() diff --git a/src/game/menu_character.cpp b/generated-src/menu_character.cpp similarity index 99% rename from src/game/menu_character.cpp rename to generated-src/menu_character.cpp index c101727..a691a99 100644 --- a/src/game/menu_character.cpp +++ b/generated-src/menu_character.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006ba840 std_string * Menu_Character::ChangeCharacterPage(std_string *param_2, std_string *param_3) diff --git a/src/game/menu_character_entry.cpp b/generated-src/menu_character_entry.cpp similarity index 97% rename from src/game/menu_character_entry.cpp rename to generated-src/menu_character_entry.cpp index 872f5c2..1c0e1f3 100644 --- a/src/game/menu_character_entry.cpp +++ b/generated-src/menu_character_entry.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00946cd0 byte Menu_Character_Entry::IsCharacterAvailable(int unused) diff --git a/src/game/menu_collection.cpp b/generated-src/menu_collection.cpp similarity index 99% rename from src/game/menu_collection.cpp rename to generated-src/menu_collection.cpp index bef0aaa..5cb28d5 100644 --- a/src/game/menu_collection.cpp +++ b/generated-src/menu_collection.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008d6b30 void Menu_Collection::render_item_pool_icons(int collectibleId, Vector *position) diff --git a/src/game/menu_controller_select.cpp b/generated-src/menu_controller_select.cpp similarity index 99% rename from src/game/menu_controller_select.cpp rename to generated-src/menu_controller_select.cpp index 15b7ec8..fa42355 100644 --- a/src/game/menu_controller_select.cpp +++ b/generated-src/menu_controller_select.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008c9530 void Menu_ControllerSelect::Update() diff --git a/src/game/menu_create_lobby.cpp b/generated-src/menu_create_lobby.cpp similarity index 99% rename from src/game/menu_create_lobby.cpp rename to generated-src/menu_create_lobby.cpp index a632c47..14b6c35 100644 --- a/src/game/menu_create_lobby.cpp +++ b/generated-src/menu_create_lobby.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008cbaf0 void Menu_CreateLobby::unload_graphics() diff --git a/src/game/menu_custom_challenge.cpp b/generated-src/menu_custom_challenge.cpp similarity index 99% rename from src/game/menu_custom_challenge.cpp rename to generated-src/menu_custom_challenge.cpp index 86adc9f..60d44ff 100644 --- a/src/game/menu_custom_challenge.cpp +++ b/generated-src/menu_custom_challenge.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008ce080 void Menu_CustomChallenge::Update() diff --git a/src/game/menu_cutscenes.cpp b/generated-src/menu_cutscenes.cpp similarity index 99% rename from src/game/menu_cutscenes.cpp rename to generated-src/menu_cutscenes.cpp index 57458ef..fe09883 100644 --- a/src/game/menu_cutscenes.cpp +++ b/generated-src/menu_cutscenes.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008ced40 void Menu_Cutscenes::Update() diff --git a/src/game/menu_daily_challenge.cpp b/generated-src/menu_daily_challenge.cpp similarity index 99% rename from src/game/menu_daily_challenge.cpp rename to generated-src/menu_daily_challenge.cpp index 0ae2d14..9599553 100644 --- a/src/game/menu_daily_challenge.cpp +++ b/generated-src/menu_daily_challenge.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008cf610 void Menu_DailyChallenge::Update() diff --git a/src/game/menu_dialog.cpp b/generated-src/menu_dialog.cpp similarity index 99% rename from src/game/menu_dialog.cpp rename to generated-src/menu_dialog.cpp index 4156217..c5242e2 100644 --- a/src/game/menu_dialog.cpp +++ b/generated-src/menu_dialog.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009c3f30 void MenuDialog::constructor() diff --git a/src/game/menu_game.cpp b/generated-src/menu_game.cpp similarity index 99% rename from src/game/menu_game.cpp rename to generated-src/menu_game.cpp index 9ba5baf..ce8c9f9 100644 --- a/src/game/menu_game.cpp +++ b/generated-src/menu_game.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00980b40 void Menu_Game::destructor() diff --git a/src/game/menu_key_config.cpp b/generated-src/menu_key_config.cpp similarity index 99% rename from src/game/menu_key_config.cpp rename to generated-src/menu_key_config.cpp index 7888769..af8b0f7 100644 --- a/src/game/menu_key_config.cpp +++ b/generated-src/menu_key_config.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008d8b00 void Menu_KeyConfig::Update() diff --git a/src/game/menu_lobby_list.cpp b/generated-src/menu_lobby_list.cpp similarity index 99% rename from src/game/menu_lobby_list.cpp rename to generated-src/menu_lobby_list.cpp index 957a30b..cec6dcd 100644 --- a/src/game/menu_lobby_list.cpp +++ b/generated-src/menu_lobby_list.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008df9b0 void Menu_LobbyList::render_lobbies() diff --git a/src/game/menu_lobby_list_filters.cpp b/generated-src/menu_lobby_list_filters.cpp similarity index 99% rename from src/game/menu_lobby_list_filters.cpp rename to generated-src/menu_lobby_list_filters.cpp index d903656..cb40240 100644 --- a/src/game/menu_lobby_list_filters.cpp +++ b/generated-src/menu_lobby_list_filters.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008dc1a0 void Menu_LobbyListFilters::constructor() diff --git a/src/game/menu_manager.cpp b/generated-src/menu_manager.cpp similarity index 99% rename from src/game/menu_manager.cpp rename to generated-src/menu_manager.cpp index 05c28a7..bce1b3c 100644 --- a/src/game/menu_manager.cpp +++ b/generated-src/menu_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00986450 void MenuManager::constructor() diff --git a/src/game/menu_mod_challenges.cpp b/generated-src/menu_mod_challenges.cpp similarity index 98% rename from src/game/menu_mod_challenges.cpp rename to generated-src/menu_mod_challenges.cpp index 9d0e9b1..a05fb64 100644 --- a/src/game/menu_mod_challenges.cpp +++ b/generated-src/menu_mod_challenges.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008ceb90 void Menu_ModChallenges::reset() diff --git a/src/game/menu_mods.cpp b/generated-src/menu_mods.cpp similarity index 99% rename from src/game/menu_mods.cpp rename to generated-src/menu_mods.cpp index b629581..d95d0d3 100644 --- a/src/game/menu_mods.cpp +++ b/generated-src/menu_mods.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0069d290 void Menu_Mods::Update() diff --git a/src/game/menu_online.cpp b/generated-src/menu_online.cpp similarity index 99% rename from src/game/menu_online.cpp rename to generated-src/menu_online.cpp index 65f22ca..26edf12 100644 --- a/src/game/menu_online.cpp +++ b/generated-src/menu_online.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008cc1a0 void Menu_Online::render_mode_select() diff --git a/src/game/menu_online_lobby.cpp b/generated-src/menu_online_lobby.cpp similarity index 99% rename from src/game/menu_online_lobby.cpp rename to generated-src/menu_online_lobby.cpp index 52f7c2d..59aee89 100644 --- a/src/game/menu_online_lobby.cpp +++ b/generated-src/menu_online_lobby.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008db070 void Menu_OnlineLobby::update_list_cursor() diff --git a/src/game/menu_online_lobby_list.cpp b/generated-src/menu_online_lobby_list.cpp similarity index 99% rename from src/game/menu_online_lobby_list.cpp rename to generated-src/menu_online_lobby_list.cpp index 6843860..f01d9f5 100644 --- a/src/game/menu_online_lobby_list.cpp +++ b/generated-src/menu_online_lobby_list.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008dca50 void Menu_OnlineLobbyList::load_graphics() diff --git a/src/game/menu_online_mode.cpp b/generated-src/menu_online_mode.cpp similarity index 99% rename from src/game/menu_online_mode.cpp rename to generated-src/menu_online_mode.cpp index 6aa33d7..9e47ffa 100644 --- a/src/game/menu_online_mode.cpp +++ b/generated-src/menu_online_mode.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008cbfe0 void Menu_OnlineMode::Update() diff --git a/src/game/menu_options.cpp b/generated-src/menu_options.cpp similarity index 99% rename from src/game/menu_options.cpp rename to generated-src/menu_options.cpp index d215a6e..842a979 100644 --- a/src/game/menu_options.cpp +++ b/generated-src/menu_options.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009b1fc0 void Menu_Options::constructor() diff --git a/src/game/menu_save.cpp b/generated-src/menu_save.cpp similarity index 99% rename from src/game/menu_save.cpp rename to generated-src/menu_save.cpp index 86f9763..28f31d8 100644 --- a/src/game/menu_save.cpp +++ b/generated-src/menu_save.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0085b300 void Menu_Save::select_save_slot(void *lobbyHandleVtable, void *lobby, void *lobbyRefCount) diff --git a/src/game/menu_special_seeds.cpp b/generated-src/menu_special_seeds.cpp similarity index 99% rename from src/game/menu_special_seeds.cpp rename to generated-src/menu_special_seeds.cpp index ac98095..93af63a 100644 --- a/src/game/menu_special_seeds.cpp +++ b/generated-src/menu_special_seeds.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008f01b0 void Menu_SpecialSeeds::Update() diff --git a/src/game/menu_stats.cpp b/generated-src/menu_stats.cpp similarity index 99% rename from src/game/menu_stats.cpp rename to generated-src/menu_stats.cpp index 40f8f56..8197c07 100644 --- a/src/game/menu_stats.cpp +++ b/generated-src/menu_stats.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00630560 void Menu_Stats::Render(int param_2) diff --git a/src/game/menu_title.cpp b/generated-src/menu_title.cpp similarity index 99% rename from src/game/menu_title.cpp rename to generated-src/menu_title.cpp index 99b7a0a..cee1f55 100644 --- a/src/game/menu_title.cpp +++ b/generated-src/menu_title.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009ef740 void Menu_Title::load_graphics() diff --git a/src/game/message_popup.cpp b/generated-src/message_popup.cpp similarity index 99% rename from src/game/message_popup.cpp rename to generated-src/message_popup.cpp index 11ba6b8..f642555 100644 --- a/src/game/message_popup.cpp +++ b/generated-src/message_popup.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009c25e0 MessagePopup::MessagePopup(void *font, void *callback, void *userData, Vector *position) diff --git a/src/game/minimap.cpp b/generated-src/minimap.cpp similarity index 99% rename from src/game/minimap.cpp rename to generated-src/minimap.cpp index 6e1e7d9..d3adf96 100644 --- a/src/game/minimap.cpp +++ b/generated-src/minimap.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0098b1d0 Minimap::~Minimap() diff --git a/src/game/mod.cpp b/generated-src/mod.cpp similarity index 99% rename from src/game/mod.cpp rename to generated-src/mod.cpp index 8a01d6d..a415631 100644 --- a/src/game/mod.cpp +++ b/generated-src/mod.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008f99c0 std_string * Mod::GetContentPath(std_string *outPath, std_string *name) diff --git a/src/game/mod_entry.cpp b/generated-src/mod_entry.cpp similarity index 99% rename from src/game/mod_entry.cpp rename to generated-src/mod_entry.cpp index 6ad4c10..f62eee1 100644 --- a/src/game/mod_entry.cpp +++ b/generated-src/mod_entry.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008f2d80 ModEntry::ModEntry() diff --git a/src/game/mod_manager.cpp b/generated-src/mod_manager.cpp similarity index 99% rename from src/game/mod_manager.cpp rename to generated-src/mod_manager.cpp index c382c5e..b0bc1a4 100644 --- a/src/game/mod_manager.cpp +++ b/generated-src/mod_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008f2ff0 ModManager::~ModManager() diff --git a/src/game/mtrng.cpp b/generated-src/mtrng.cpp similarity index 98% rename from src/game/mtrng.cpp rename to generated-src/mtrng.cpp index 79bbc63..8e47404 100644 --- a/src/game/mtrng.cpp +++ b/generated-src/mtrng.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008fd3c0 void MTRNG::Init(uint seed) diff --git a/src/game/multiplayer.cpp b/generated-src/multiplayer.cpp similarity index 99% rename from src/game/multiplayer.cpp rename to generated-src/multiplayer.cpp index e42d1a2..9087cfa 100644 --- a/src/game/multiplayer.cpp +++ b/generated-src/multiplayer.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a29370 void Multiplayer::set_service_provider(int providerType) diff --git a/src/game/music.cpp b/generated-src/music.cpp similarity index 99% rename from src/game/music.cpp rename to generated-src/music.cpp index e4d0832..0cab80c 100644 --- a/src/game/music.cpp +++ b/generated-src/music.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 007df690 void Music::SetPitchAll(float pitch) diff --git a/src/game/music_channel.cpp b/generated-src/music_channel.cpp similarity index 99% rename from src/game/music_channel.cpp rename to generated-src/music_channel.cpp index 52fac64..4640587 100644 --- a/src/game/music_channel.cpp +++ b/generated-src/music_channel.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 007df710 void MusicChannel::play_track(int param_1) diff --git a/src/game/music_manager.cpp b/generated-src/music_manager.cpp similarity index 99% rename from src/game/music_manager.cpp rename to generated-src/music_manager.cpp index fd8c4f5..c34e29b 100644 --- a/src/game/music_manager.cpp +++ b/generated-src/music_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00428cd0 MusicManager::MusicManager() diff --git a/src/game/mutex.cpp b/generated-src/mutex.cpp similarity index 98% rename from src/game/mutex.cpp rename to generated-src/mutex.cpp index 971180a..a30b53f 100644 --- a/src/game/mutex.cpp +++ b/generated-src/mutex.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00aaaf50 void Mutex::lock() diff --git a/src/game/mutex/scope_lock.cpp b/generated-src/mutex/scope_lock.cpp similarity index 98% rename from src/game/mutex/scope_lock.cpp rename to generated-src/mutex/scope_lock.cpp index d7873b0..837fce8 100644 --- a/src/game/mutex/scope_lock.cpp +++ b/generated-src/mutex/scope_lock.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00aaae20 Mutex::ScopeLock::~ScopeLock() diff --git a/src/game/net_desync_handler.cpp b/generated-src/net_desync_handler.cpp similarity index 99% rename from src/game/net_desync_handler.cpp rename to generated-src/net_desync_handler.cpp index be5f796..6ae01b8 100644 --- a/src/game/net_desync_handler.cpp +++ b/generated-src/net_desync_handler.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008fd900 void NetDesyncHandler::Update() diff --git a/src/game/net_input_device.cpp b/generated-src/net_input_device.cpp similarity index 99% rename from src/game/net_input_device.cpp rename to generated-src/net_input_device.cpp index 99131d6..bfbced1 100644 --- a/src/game/net_input_device.cpp +++ b/generated-src/net_input_device.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009015b0 NetInputDevice::NetInputDevice(void *userProfile) diff --git a/src/game/netplay_manager.cpp b/generated-src/netplay_manager.cpp similarity index 99% rename from src/game/netplay_manager.cpp rename to generated-src/netplay_manager.cpp index 312d39c..2d4cd2d 100644 --- a/src/game/netplay_manager.cpp +++ b/generated-src/netplay_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008fd530 byte NetplayManager::process_consolidated_messages() diff --git a/src/game/netplay_text_popup.cpp b/generated-src/netplay_text_popup.cpp similarity index 99% rename from src/game/netplay_text_popup.cpp rename to generated-src/netplay_text_popup.cpp index bb08228..4f11b33 100644 --- a/src/game/netplay_text_popup.cpp +++ b/generated-src/netplay_text_popup.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00923800 void NetplayTextPopup::destructor() diff --git a/src/game/network_manager.cpp b/generated-src/network_manager.cpp similarity index 99% rename from src/game/network_manager.cpp rename to generated-src/network_manager.cpp index b20a331..458bbd6 100644 --- a/src/game/network_manager.cpp +++ b/generated-src/network_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a78770 void * NetworkManager::receive_message(void *outMessage, byte channel, byte isRemove) diff --git a/src/game/nightmare_scene.cpp b/generated-src/nightmare_scene.cpp similarity index 99% rename from src/game/nightmare_scene.cpp rename to generated-src/nightmare_scene.cpp index 99510b9..6b65d3c 100644 --- a/src/game/nightmare_scene.cpp +++ b/generated-src/nightmare_scene.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0091fe80 int NightmareScene::load_nightmares_xml(byte *path) diff --git a/src/game/npc_helper.cpp b/generated-src/npc_helper.cpp similarity index 99% rename from src/game/npc_helper.cpp rename to generated-src/npc_helper.cpp index 6a46c7f..499e1c1 100644 --- a/src/game/npc_helper.cpp +++ b/generated-src/npc_helper.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004830e0 void NpcHelper::the_lamb_pattern(Entity_NPC *npc, int pattern, int frame) diff --git a/src/game/npcai_pathfinder.cpp b/generated-src/npcai_pathfinder.cpp similarity index 99% rename from src/game/npcai_pathfinder.cpp rename to generated-src/npcai_pathfinder.cpp index fddbd09..0af6f8c 100644 --- a/src/game/npcai_pathfinder.cpp +++ b/generated-src/npcai_pathfinder.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 007e6fa0 void NPCAI_Pathfinder::ResetMovementTarget() diff --git a/src/game/online_chat.cpp b/generated-src/online_chat.cpp similarity index 99% rename from src/game/online_chat.cpp rename to generated-src/online_chat.cpp index 6ed805b..106bdb3 100644 --- a/src/game/online_chat.cpp +++ b/generated-src/online_chat.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0091d2b0 void OnlineChat::render(Vector *position, byte isInputLine, byte isCursorVisible, float alpha) diff --git a/src/game/online_chat_message.cpp b/generated-src/online_chat_message.cpp similarity index 98% rename from src/game/online_chat_message.cpp rename to generated-src/online_chat_message.cpp index 6829b07..f15608d 100644 --- a/src/game/online_chat_message.cpp +++ b/generated-src/online_chat_message.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0091cec0 void OnlineChatMessage::constructor() diff --git a/src/game/online_emotes.cpp b/generated-src/online_emotes.cpp similarity index 99% rename from src/game/online_emotes.cpp rename to generated-src/online_emotes.cpp index 5a693c2..fd294c8 100644 --- a/src/game/online_emotes.cpp +++ b/generated-src/online_emotes.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0042fa30 void OnlineEmotes::constructor() diff --git a/src/game/online_stats_screen.cpp b/generated-src/online_stats_screen.cpp similarity index 98% rename from src/game/online_stats_screen.cpp rename to generated-src/online_stats_screen.cpp index 274fb6c..aeac549 100644 --- a/src/game/online_stats_screen.cpp +++ b/generated-src/online_stats_screen.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008ca220 OnlineStatsScreen::~OnlineStatsScreen() diff --git a/src/game/options_config.cpp b/generated-src/options_config.cpp similarity index 99% rename from src/game/options_config.cpp rename to generated-src/options_config.cpp index c63365f..a1be74d 100644 --- a/src/game/options_config.cpp +++ b/generated-src/options_config.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006841d0 byte OptionsConfig::read_bool(byte *key, byte isDefault) diff --git a/src/game/path_finder.cpp b/generated-src/path_finder.cpp similarity index 99% rename from src/game/path_finder.cpp rename to generated-src/path_finder.cpp index a41fb9b..f10d4bb 100644 --- a/src/game/path_finder.cpp +++ b/generated-src/path_finder.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00456370 int PathFinder::GetGridIndex() diff --git a/src/game/path_node.cpp b/generated-src/path_node.cpp similarity index 98% rename from src/game/path_node.cpp rename to generated-src/path_node.cpp index 751b4aa..0cb5ef6 100644 --- a/src/game/path_node.cpp +++ b/generated-src/path_node.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 007e48b0 PathNode::PathNode(void *other) diff --git a/src/game/pause_screen.cpp b/generated-src/pause_screen.cpp similarity index 99% rename from src/game/pause_screen.cpp rename to generated-src/pause_screen.cpp index 28fb65e..3293abf 100644 --- a/src/game/pause_screen.cpp +++ b/generated-src/pause_screen.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008d0fd0 void PauseScreen::load_drop_player_menu() diff --git a/src/game/pause_screen_my_stuff.cpp b/generated-src/pause_screen_my_stuff.cpp similarity index 99% rename from src/game/pause_screen_my_stuff.cpp rename to generated-src/pause_screen_my_stuff.cpp index 085e042..e553dd5 100644 --- a/src/game/pause_screen_my_stuff.cpp +++ b/generated-src/pause_screen_my_stuff.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008d2a30 PauseScreen_MyStuff::~PauseScreen_MyStuff() diff --git a/src/game/persistent_game_data.cpp b/generated-src/persistent_game_data.cpp similarity index 99% rename from src/game/persistent_game_data.cpp rename to generated-src/persistent_game_data.cpp index aac4616..e85d047 100644 --- a/src/game/persistent_game_data.cpp +++ b/generated-src/persistent_game_data.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0091b720 void PersistentGameData::copy_shared_progress(PersistentGameData *dst, PersistentGameData *src) diff --git a/src/game/persistent_game_data_bestiary.cpp b/generated-src/persistent_game_data_bestiary.cpp similarity index 99% rename from src/game/persistent_game_data_bestiary.cpp rename to generated-src/persistent_game_data_bestiary.cpp index 1607ea2..eafe66b 100644 --- a/src/game/persistent_game_data_bestiary.cpp +++ b/generated-src/persistent_game_data_bestiary.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00926020 PersistentGameData_Bestiary * PersistentGameData_Bestiary::constructor() diff --git a/src/game/persistent_game_data_reader.cpp b/generated-src/persistent_game_data_reader.cpp similarity index 99% rename from src/game/persistent_game_data_reader.cpp rename to generated-src/persistent_game_data_reader.cpp index a5064d8..651ee8e 100644 --- a/src/game/persistent_game_data_reader.cpp +++ b/generated-src/persistent_game_data_reader.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0091adf0 void PersistentGameDataReader::read(PersistentGameData *data) diff --git a/src/game/persistent_game_data_writer.cpp b/generated-src/persistent_game_data_writer.cpp similarity index 99% rename from src/game/persistent_game_data_writer.cpp rename to generated-src/persistent_game_data_writer.cpp index c219661..dc4d35d 100644 --- a/src/game/persistent_game_data_writer.cpp +++ b/generated-src/persistent_game_data_writer.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0091acc0 void * PersistentGameDataWriter::compress(uint *outSize) diff --git a/src/game/pill_effect.cpp b/generated-src/pill_effect.cpp similarity index 97% rename from src/game/pill_effect.cpp rename to generated-src/pill_effect.cpp index 2a46171..586f382 100644 --- a/src/game/pill_effect.cpp +++ b/generated-src/pill_effect.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00730b20 byte PillEffect::IsAvailable() diff --git a/src/game/player_hud.cpp b/generated-src/player_hud.cpp similarity index 99% rename from src/game/player_hud.cpp rename to generated-src/player_hud.cpp index c6c39bc..d20a08a 100644 --- a/src/game/player_hud.cpp +++ b/generated-src/player_hud.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00840030 void PlayerHUD::set_active_charge_frame(int collectibleId, Entity_Player *player) diff --git a/src/game/player_manager.cpp b/generated-src/player_manager.cpp similarity index 99% rename from src/game/player_manager.cpp rename to generated-src/player_manager.cpp index 306672c..96134b0 100644 --- a/src/game/player_manager.cpp +++ b/generated-src/player_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0044bfb0 byte PlayerManager::AnyoneHasTrinket(int trinketType) diff --git a/src/game/png_writer.cpp b/generated-src/png_writer.cpp similarity index 99% rename from src/game/png_writer.cpp rename to generated-src/png_writer.cpp index d8d3fc1..5f8097d 100644 --- a/src/game/png_writer.cpp +++ b/generated-src/png_writer.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009e8d40 void PngWriter::write_end() diff --git a/src/game/pocket_item_config.cpp b/generated-src/pocket_item_config.cpp similarity index 98% rename from src/game/pocket_item_config.cpp rename to generated-src/pocket_item_config.cpp index ae72816..ffa199c 100644 --- a/src/game/pocket_item_config.cpp +++ b/generated-src/pocket_item_config.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00724af0 std_string * PocketItemConfig::GetName(std_string *outName, int language) diff --git a/src/game/point.cpp b/generated-src/point.cpp similarity index 98% rename from src/game/point.cpp rename to generated-src/point.cpp index a25b3c5..488475b 100644 --- a/src/game/point.cpp +++ b/generated-src/point.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0041e4c0 void Point::UpdateNormal(Vector *unk) diff --git a/src/game/popup.cpp b/generated-src/popup.cpp similarity index 99% rename from src/game/popup.cpp rename to generated-src/popup.cpp index 06cba16..ee420c8 100644 --- a/src/game/popup.cpp +++ b/generated-src/popup.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009c01d0 void * Popup::constructor(void *desc) diff --git a/src/game/popup_buttons.cpp b/generated-src/popup_buttons.cpp similarity index 99% rename from src/game/popup_buttons.cpp rename to generated-src/popup_buttons.cpp index 47de92e..79e71b2 100644 --- a/src/game/popup_buttons.cpp +++ b/generated-src/popup_buttons.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00423990 void PopupButtons::Init() diff --git a/src/game/popup_manager.cpp b/generated-src/popup_manager.cpp similarity index 98% rename from src/game/popup_manager.cpp rename to generated-src/popup_manager.cpp index 6470b5a..5a9a279 100644 --- a/src/game/popup_manager.cpp +++ b/generated-src/popup_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009c3ab0 void PopupManager::close(int *popupId, int *result) diff --git a/src/game/popup_queue.cpp b/generated-src/popup_queue.cpp similarity index 99% rename from src/game/popup_queue.cpp rename to generated-src/popup_queue.cpp index 98bd254..9c47346 100644 --- a/src/game/popup_queue.cpp +++ b/generated-src/popup_queue.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009c3290 void PopupQueue::destructor() diff --git a/src/game/popup_window.cpp b/generated-src/popup_window.cpp similarity index 99% rename from src/game/popup_window.cpp rename to generated-src/popup_window.cpp index 98075ac..6a4a4e9 100644 --- a/src/game/popup_window.cpp +++ b/generated-src/popup_window.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009b7500 void PopupWindow::hide() diff --git a/src/game/preload_manager.cpp b/generated-src/preload_manager.cpp similarity index 99% rename from src/game/preload_manager.cpp rename to generated-src/preload_manager.cpp index 9160175..068c8c5 100644 --- a/src/game/preload_manager.cpp +++ b/generated-src/preload_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009c6c90 void PreloadManager::load_group(std_string *groupName) diff --git a/src/game/procedural_effect.cpp b/generated-src/procedural_effect.cpp similarity index 99% rename from src/game/procedural_effect.cpp rename to generated-src/procedural_effect.cpp index 5e28b64..c522f3f 100644 --- a/src/game/procedural_effect.cpp +++ b/generated-src/procedural_effect.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009e0700 byte ProceduralEffect::roll_trigger_target(uint *outTarget, float *outChance, RNG *rng) diff --git a/src/game/procedural_item_manager.cpp b/generated-src/procedural_item_manager.cpp similarity index 98% rename from src/game/procedural_item_manager.cpp rename to generated-src/procedural_item_manager.cpp index 4fa8fbb..ab9b776 100644 --- a/src/game/procedural_item_manager.cpp +++ b/generated-src/procedural_item_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009dc750 ProceduralItemManager::~ProceduralItemManager() diff --git a/src/game/projectile_params.cpp b/generated-src/projectile_params.cpp similarity index 98% rename from src/game/projectile_params.cpp rename to generated-src/projectile_params.cpp index 901a06a..ee3f0d5 100644 --- a/src/game/projectile_params.cpp +++ b/generated-src/projectile_params.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0043ef30 ProjectileParams::ProjectileParams() diff --git a/src/game/quad.cpp b/generated-src/quad.cpp similarity index 99% rename from src/game/quad.cpp rename to generated-src/quad.cpp index 8558a87..c5dbf2d 100644 --- a/src/game/quad.cpp +++ b/generated-src/quad.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a10760 void Quad::rotate(Vector *pivot, float angle) diff --git a/src/game/queue_item_data.cpp b/generated-src/queue_item_data.cpp similarity index 83% rename from src/game/queue_item_data.cpp rename to generated-src/queue_item_data.cpp index 704ed89..8510c0c 100644 --- a/src/game/queue_item_data.cpp +++ b/generated-src/queue_item_data.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 007538f0 byte QueueItemData::Touched() diff --git a/src/game/rail_manager.cpp b/generated-src/rail_manager.cpp similarity index 99% rename from src/game/rail_manager.cpp rename to generated-src/rail_manager.cpp index e2085de..be9fa3b 100644 --- a/src/game/rail_manager.cpp +++ b/generated-src/rail_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009e2f20 void RailManager::Render(Vector *offset) diff --git a/src/game/rebirth_save_data.cpp b/generated-src/rebirth_save_data.cpp similarity index 99% rename from src/game/rebirth_save_data.cpp rename to generated-src/rebirth_save_data.cpp index 7535370..b41dff7 100644 --- a/src/game/rebirth_save_data.cpp +++ b/generated-src/rebirth_save_data.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009e3dc0 void RebirthSaveData::Clear() diff --git a/src/game/reference_count_base.cpp b/generated-src/reference_count_base.cpp similarity index 96% rename from src/game/reference_count_base.cpp rename to generated-src/reference_count_base.cpp index f18d5f3..ddb751d 100644 --- a/src/game/reference_count_base.cpp +++ b/generated-src/reference_count_base.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0040cc10 ReferenceCountBase::ReferenceCountBase() diff --git a/src/game/render_batch.cpp b/generated-src/render_batch.cpp similarity index 99% rename from src/game/render_batch.cpp rename to generated-src/render_batch.cpp index 531b8e5..9fa53b3 100644 --- a/src/game/render_batch.cpp +++ b/generated-src/render_batch.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a66e30 void RenderBatch::set_state(int param_1) diff --git a/src/game/render_target.cpp b/generated-src/render_target.cpp similarity index 97% rename from src/game/render_target.cpp rename to generated-src/render_target.cpp index b4c2904..de2601d 100644 --- a/src/game/render_target.cpp +++ b/generated-src/render_target.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a18230 void RenderTarget::Clear() diff --git a/src/game/revive_player_menu.cpp b/generated-src/revive_player_menu.cpp similarity index 99% rename from src/game/revive_player_menu.cpp rename to generated-src/revive_player_menu.cpp index d036984..8a9e7e7 100644 --- a/src/game/revive_player_menu.cpp +++ b/generated-src/revive_player_menu.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008ef4b0 RevivePlayerMenu::~RevivePlayerMenu() diff --git a/src/game/rich_text.cpp b/generated-src/rich_text.cpp similarity index 99% rename from src/game/rich_text.cpp rename to generated-src/rich_text.cpp index 89178ed..d31df1a 100644 --- a/src/game/rich_text.cpp +++ b/generated-src/rich_text.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009efa10 RichText::~RichText() diff --git a/src/game/rich_text_icon.cpp b/generated-src/rich_text_icon.cpp similarity index 99% rename from src/game/rich_text_icon.cpp rename to generated-src/rich_text_icon.cpp index b1fde17..1e1672d 100644 --- a/src/game/rich_text_icon.cpp +++ b/generated-src/rich_text_icon.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009f24b0 void RichTextIcon::render(Vector *pos, int iconType, int iconId, float alpha) diff --git a/src/game/rich_text_span.cpp b/generated-src/rich_text_span.cpp similarity index 99% rename from src/game/rich_text_span.cpp rename to generated-src/rich_text_span.cpp index f101906..5a4dae6 100644 --- a/src/game/rich_text_span.cpp +++ b/generated-src/rich_text_span.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009ef9a0 byte RichTextSpan::try_merge(void *other) diff --git a/src/game/rng.cpp b/generated-src/rng.cpp similarity index 99% rename from src/game/rng.cpp rename to generated-src/rng.cpp index 9e2a692..535bb98 100644 --- a/src/game/rng.cpp +++ b/generated-src/rng.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 005cc070 void RNG::Shuffle(RNG *rng, int *begin, int *end) diff --git a/src/game/room.cpp b/generated-src/room.cpp similarity index 99% rename from src/game/room.cpp rename to generated-src/room.cpp index 5f0a5ae..7352173 100644 --- a/src/game/room.cpp +++ b/generated-src/room.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0040c2e0 int Room::GetGridHeight() diff --git a/src/game/room_config.cpp b/generated-src/room_config.cpp similarity index 99% rename from src/game/room_config.cpp rename to generated-src/room_config.cpp index 85536f8..87f0476 100644 --- a/src/game/room_config.cpp +++ b/generated-src/room_config.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00829670 RoomConfig::~RoomConfig() diff --git a/src/game/room_config_mode.cpp b/generated-src/room_config_mode.cpp similarity index 99% rename from src/game/room_config_mode.cpp rename to generated-src/room_config_mode.cpp index 89a66cc..993a2fa 100644 --- a/src/game/room_config_mode.cpp +++ b/generated-src/room_config_mode.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00828b60 void RoomConfigMode::ctor() diff --git a/src/game/room_config_room.cpp b/generated-src/room_config_room.cpp similarity index 99% rename from src/game/room_config_room.cpp rename to generated-src/room_config_room.cpp index 9c0f9e3..a7bf015 100644 --- a/src/game/room_config_room.cpp +++ b/generated-src/room_config_room.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 006ef3e0 void RoomConfigRoom::dtor() diff --git a/src/game/room_config_stage.cpp b/generated-src/room_config_stage.cpp similarity index 99% rename from src/game/room_config_stage.cpp rename to generated-src/room_config_stage.cpp index c095c83..f4bbf5a 100644 --- a/src/game/room_config_stage.cpp +++ b/generated-src/room_config_stage.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00828fe0 void RoomConfig_Stage::unload() diff --git a/src/game/room_descriptor.cpp b/generated-src/room_descriptor.cpp similarity index 99% rename from src/game/room_descriptor.cpp rename to generated-src/room_descriptor.cpp index d7e42c1..9cbdb11 100644 --- a/src/game/room_descriptor.cpp +++ b/generated-src/room_descriptor.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00436010 byte RoomDescriptor::Clear() diff --git a/src/game/room_grid_path.cpp b/generated-src/room_grid_path.cpp similarity index 98% rename from src/game/room_grid_path.cpp rename to generated-src/room_grid_path.cpp index cfa6fee..6d6298c 100644 --- a/src/game/room_grid_path.cpp +++ b/generated-src/room_grid_path.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009e3450 byte RoomGridPath::can_step(int fromIndex, int toIndex) diff --git a/src/game/room_set.cpp b/generated-src/room_set.cpp similarity index 98% rename from src/game/room_set.cpp rename to generated-src/room_set.cpp index 53abd22..3d5c0f0 100644 --- a/src/game/room_set.cpp +++ b/generated-src/room_set.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00828e50 void * RoomSet::GetVariantSet(uint type) diff --git a/src/game/room_transition.cpp b/generated-src/room_transition.cpp similarity index 99% rename from src/game/room_transition.cpp rename to generated-src/room_transition.cpp index 26a47ae..96d6e46 100644 --- a/src/game/room_transition.cpp +++ b/generated-src/room_transition.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0082ebd0 RoomTransition::~RoomTransition() diff --git a/src/game/save_data_manager.cpp b/generated-src/save_data_manager.cpp similarity index 99% rename from src/game/save_data_manager.cpp rename to generated-src/save_data_manager.cpp index 6eccf34..65859b0 100644 --- a/src/game/save_data_manager.cpp +++ b/generated-src/save_data_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a24fd0 void * SaveDataManager::open_file_read(byte *fileName) diff --git a/src/game/score_sheet.cpp b/generated-src/score_sheet.cpp similarity index 99% rename from src/game/score_sheet.cpp rename to generated-src/score_sheet.cpp index b0e6030..0179a32 100644 --- a/src/game/score_sheet.cpp +++ b/generated-src/score_sheet.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00857220 void ScoreSheet::LoadAnm2() diff --git a/src/game/seeds.cpp b/generated-src/seeds.cpp similarity index 99% rename from src/game/seeds.cpp rename to generated-src/seeds.cpp index b2f1d49..d17eccb 100644 --- a/src/game/seeds.cpp +++ b/generated-src/seeds.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00428940 void Seeds::Init3(RNG *rng) diff --git a/src/game/sfx_manager.cpp b/generated-src/sfx_manager.cpp similarity index 99% rename from src/game/sfx_manager.cpp rename to generated-src/sfx_manager.cpp index 1a36ead..7a46bfd 100644 --- a/src/game/sfx_manager.cpp +++ b/generated-src/sfx_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0092cf40 void SFXManager::Preload(int soundId) diff --git a/src/game/shader.cpp b/generated-src/shader.cpp similarity index 99% rename from src/game/shader.cpp rename to generated-src/shader.cpp index 4427a17..4d438ff 100644 --- a/src/game/shader.cpp +++ b/generated-src/shader.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a14620 byte Shader::load(byte *name, void *attributes, void *params) diff --git a/src/game/shape.cpp b/generated-src/shape.cpp similarity index 99% rename from src/game/shape.cpp rename to generated-src/shape.cpp index 182831a..801cff9 100644 --- a/src/game/shape.cpp +++ b/generated-src/shape.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0042f850 Shape::Shape(void *other) diff --git a/src/game/shared_ptr.cpp b/generated-src/shared_ptr.cpp similarity index 98% rename from src/game/shared_ptr.cpp rename to generated-src/shared_ptr.cpp index c688ffe..a0a1fec 100644 --- a/src/game/shared_ptr.cpp +++ b/generated-src/shared_ptr.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0041c770 void shared_ptr::assign(void *other) diff --git a/src/game/shared_ptr_pair.cpp b/generated-src/shared_ptr_pair.cpp similarity index 98% rename from src/game/shared_ptr_pair.cpp rename to generated-src/shared_ptr_pair.cpp index 84ad8b6..ee26cac 100644 --- a/src/game/shared_ptr_pair.cpp +++ b/generated-src/shared_ptr_pair.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00424c40 void SharedPtrPair::constructor() diff --git a/src/game/shockwave_params.cpp b/generated-src/shockwave_params.cpp similarity index 95% rename from src/game/shockwave_params.cpp rename to generated-src/shockwave_params.cpp index 15dcb22..ce53c22 100644 --- a/src/game/shockwave_params.cpp +++ b/generated-src/shockwave_params.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00456570 ShockwaveParams::ShockwaveParams() diff --git a/src/game/sound_effect.cpp b/generated-src/sound_effect.cpp similarity index 99% rename from src/game/sound_effect.cpp rename to generated-src/sound_effect.cpp index 3f54834..86a5b9d 100644 --- a/src/game/sound_effect.cpp +++ b/generated-src/sound_effect.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0092cfb0 void SoundEffect::Load() diff --git a/src/game/sound_effects.cpp b/generated-src/sound_effects.cpp similarity index 99% rename from src/game/sound_effects.cpp rename to generated-src/sound_effects.cpp index 596210f..33b700b 100644 --- a/src/game/sound_effects.cpp +++ b/generated-src/sound_effects.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0092dc30 void SoundEffects::Play(int ID, float Volume, int FrameDelay, byte Loop, float Pitch, float Pan) diff --git a/src/game/sound_instance.cpp b/generated-src/sound_instance.cpp similarity index 99% rename from src/game/sound_instance.cpp rename to generated-src/sound_instance.cpp index 4ed9d8e..35e13b7 100644 --- a/src/game/sound_instance.cpp +++ b/generated-src/sound_instance.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a2a990 SoundInstance::SoundInstance() diff --git a/src/game/sound_manager.cpp b/generated-src/sound_manager.cpp similarity index 99% rename from src/game/sound_manager.cpp rename to generated-src/sound_manager.cpp index e3997e5..0946011 100644 --- a/src/game/sound_manager.cpp +++ b/generated-src/sound_manager.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a2b1e0 void * SoundManager::load_sound(void *outSound, byte *path, void *fileSource, byte isStream) diff --git a/src/game/source_quad.cpp b/generated-src/source_quad.cpp similarity index 98% rename from src/game/source_quad.cpp rename to generated-src/source_quad.cpp index dbeb696..59600d2 100644 --- a/src/game/source_quad.cpp +++ b/generated-src/source_quad.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a11210 SourceQuad::SourceQuad(void *source) diff --git a/src/game/spawn.cpp b/generated-src/spawn.cpp similarity index 97% rename from src/game/spawn.cpp rename to generated-src/spawn.cpp index 4e272e5..6ab48e7 100644 --- a/src/game/spawn.cpp +++ b/generated-src/spawn.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0082d290 void * Spawn::PickEntry(float value) diff --git a/src/game/special_seed.cpp b/generated-src/special_seed.cpp similarity index 98% rename from src/game/special_seed.cpp rename to generated-src/special_seed.cpp index b6424b4..0d670d3 100644 --- a/src/game/special_seed.cpp +++ b/generated-src/special_seed.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 008f0040 std_string * SpecialSeed::get_display_name(std_string *outName) diff --git a/src/game/sprite.cpp b/generated-src/sprite.cpp similarity index 99% rename from src/game/sprite.cpp rename to generated-src/sprite.cpp index 0d824ff..2094082 100644 --- a/src/game/sprite.cpp +++ b/generated-src/sprite.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004073d0 void Sprite::SetColor(ColorMod *color) diff --git a/src/game/stage_transition.cpp b/generated-src/stage_transition.cpp similarity index 99% rename from src/game/stage_transition.cpp rename to generated-src/stage_transition.cpp index 9a2e6e1..49eba8d 100644 --- a/src/game/stage_transition.cpp +++ b/generated-src/stage_transition.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0092f1c0 void StageTransition::Update() diff --git a/src/game/stat_hud.cpp b/generated-src/stat_hud.cpp similarity index 99% rename from src/game/stat_hud.cpp rename to generated-src/stat_hud.cpp index 8ca4550..9580629 100644 --- a/src/game/stat_hud.cpp +++ b/generated-src/stat_hud.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0084c2c0 void StatHUD::Render(float *param_1) diff --git a/src/game/stats_panel.cpp b/generated-src/stats_panel.cpp similarity index 99% rename from src/game/stats_panel.cpp rename to generated-src/stats_panel.cpp index 99ae5f6..32251dd 100644 --- a/src/game/stats_panel.cpp +++ b/generated-src/stats_panel.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0084dc00 void StatsPanel::add_stat_line() diff --git a/src/game/string_table.cpp b/generated-src/string_table.cpp similarity index 99% rename from src/game/string_table.cpp rename to generated-src/string_table.cpp index eb9c565..2615f12 100644 --- a/src/game/string_table.cpp +++ b/generated-src/string_table.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a26710 void StringTable::constructor() diff --git a/src/game/tear_params.cpp b/generated-src/tear_params.cpp similarity index 99% rename from src/game/tear_params.cpp rename to generated-src/tear_params.cpp index 3bc5b0d..a50141a 100644 --- a/src/game/tear_params.cpp +++ b/generated-src/tear_params.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 005cd690 void TearParams::constructor() diff --git a/src/game/temporary_effect.cpp b/generated-src/temporary_effect.cpp similarity index 93% rename from src/game/temporary_effect.cpp rename to generated-src/temporary_effect.cpp index 96beb7d..cc8f55b 100644 --- a/src/game/temporary_effect.cpp +++ b/generated-src/temporary_effect.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00435f80 TemporaryEffect::TemporaryEffect(ItemConfig_Item *item) diff --git a/src/game/temporary_effects.cpp b/generated-src/temporary_effects.cpp similarity index 99% rename from src/game/temporary_effects.cpp rename to generated-src/temporary_effects.cpp index 4213a04..3133caa 100644 --- a/src/game/temporary_effects.cpp +++ b/generated-src/temporary_effects.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 007537a0 void * TemporaryEffects::GetEffectsList() diff --git a/src/game/umbilical_baby_data.cpp b/generated-src/umbilical_baby_data.cpp similarity index 92% rename from src/game/umbilical_baby_data.cpp rename to generated-src/umbilical_baby_data.cpp index 770067d..aa403f4 100644 --- a/src/game/umbilical_baby_data.cpp +++ b/generated-src/umbilical_baby_data.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00435590 undefined4 UmbilicalBabyData::last_point() diff --git a/src/game/user_profile.cpp b/generated-src/user_profile.cpp similarity index 98% rename from src/game/user_profile.cpp rename to generated-src/user_profile.cpp index abfd70f..e594a21 100644 --- a/src/game/user_profile.cpp +++ b/generated-src/user_profile.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a23ae0 void UserProfile::find_or_create() diff --git a/src/game/vector.cpp b/generated-src/vector.cpp similarity index 99% rename from src/game/vector.cpp rename to generated-src/vector.cpp index 6d04add..31708f8 100644 --- a/src/game/vector.cpp +++ b/generated-src/vector.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 004171d0 Vector * Vector::operator_mul(Vector *outResult, float *scalar, Vector *vector) diff --git a/src/game/video_player.cpp b/generated-src/video_player.cpp similarity index 99% rename from src/game/video_player.cpp rename to generated-src/video_player.cpp index 45efb1c..e6c6f0f 100644 --- a/src/game/video_player.cpp +++ b/generated-src/video_player.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009f2ee0 void VideoPlayer::play(byte *fileName, float volume) diff --git a/src/game/weapon.cpp b/generated-src/weapon.cpp similarity index 99% rename from src/game/weapon.cpp rename to generated-src/weapon.cpp index 2df35d8..09e56ba 100644 --- a/src/game/weapon.cpp +++ b/generated-src/weapon.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0075a2b0 byte Weapon::is_held_item(ANM2 *sprite, std_string *animName, void *itemDesc) diff --git a/src/game/weapon_bombs.cpp b/generated-src/weapon_bombs.cpp similarity index 98% rename from src/game/weapon_bombs.cpp rename to generated-src/weapon_bombs.cpp index 41b0172..a37ed3d 100644 --- a/src/game/weapon_bombs.cpp +++ b/generated-src/weapon_bombs.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009fa190 undefined4 Weapon_Bombs::GetFocusEntity() diff --git a/src/game/weapon_bone.cpp b/generated-src/weapon_bone.cpp similarity index 99% rename from src/game/weapon_bone.cpp rename to generated-src/weapon_bone.cpp index b777533..79bb20a 100644 --- a/src/game/weapon_bone.cpp +++ b/generated-src/weapon_bone.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009fed90 void Weapon_Bone::Reset() diff --git a/src/game/weapon_brimstone.cpp b/generated-src/weapon_brimstone.cpp similarity index 99% rename from src/game/weapon_brimstone.cpp rename to generated-src/weapon_brimstone.cpp index 58eb002..42a4313 100644 --- a/src/game/weapon_brimstone.cpp +++ b/generated-src/weapon_brimstone.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009f3160 undefined4 Weapon_Brimstone::GetMainEntity() diff --git a/src/game/weapon_deathmatch.cpp b/generated-src/weapon_deathmatch.cpp similarity index 90% rename from src/game/weapon_deathmatch.cpp rename to generated-src/weapon_deathmatch.cpp index 68d3c25..7ce5dbc 100644 --- a/src/game/weapon_deathmatch.cpp +++ b/generated-src/weapon_deathmatch.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a036b0 float10 Weapon_Deathmatch::GetMaxCharge() diff --git a/src/game/weapon_fetus.cpp b/generated-src/weapon_fetus.cpp similarity index 90% rename from src/game/weapon_fetus.cpp rename to generated-src/weapon_fetus.cpp index 480e8b4..a06bd72 100644 --- a/src/game/weapon_fetus.cpp +++ b/generated-src/weapon_fetus.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a03f60 float10 Weapon_Fetus::GetMaxCharge() diff --git a/src/game/weapon_knife.cpp b/generated-src/weapon_knife.cpp similarity index 99% rename from src/game/weapon_knife.cpp rename to generated-src/weapon_knife.cpp index b21406f..bb18f8e 100644 --- a/src/game/weapon_knife.cpp +++ b/generated-src/weapon_knife.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a04f90 void Weapon_Knife::ClearReferences() diff --git a/src/game/weapon_laser.cpp b/generated-src/weapon_laser.cpp similarity index 99% rename from src/game/weapon_laser.cpp rename to generated-src/weapon_laser.cpp index 11ff1e6..c8c93e3 100644 --- a/src/game/weapon_laser.cpp +++ b/generated-src/weapon_laser.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a052a0 void Weapon_Laser::Reset() diff --git a/src/game/weapon_monstros_lung.cpp b/generated-src/weapon_monstros_lung.cpp similarity index 99% rename from src/game/weapon_monstros_lung.cpp rename to generated-src/weapon_monstros_lung.cpp index 2edf989..546eafd 100644 --- a/src/game/weapon_monstros_lung.cpp +++ b/generated-src/weapon_monstros_lung.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a08700 void Weapon_MonstrosLung::FireBurst(undefined4 param_1, int param_2) diff --git a/src/game/weapon_rockets.cpp b/generated-src/weapon_rockets.cpp similarity index 96% rename from src/game/weapon_rockets.cpp rename to generated-src/weapon_rockets.cpp index 16ac6c1..84b1e04 100644 --- a/src/game/weapon_rockets.cpp +++ b/generated-src/weapon_rockets.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a099a0 undefined4 Weapon_Rockets::GetMarkedTargetVariant() diff --git a/src/game/weapon_spirit_sword.cpp b/generated-src/weapon_spirit_sword.cpp similarity index 92% rename from src/game/weapon_spirit_sword.cpp rename to generated-src/weapon_spirit_sword.cpp index e436e5e..d5149aa 100644 --- a/src/game/weapon_spirit_sword.cpp +++ b/generated-src/weapon_spirit_sword.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a0a6f0 void Weapon_SpiritSword::Reset() diff --git a/src/game/weapon_tears.cpp b/generated-src/weapon_tears.cpp similarity index 98% rename from src/game/weapon_tears.cpp rename to generated-src/weapon_tears.cpp index 24b9fc4..84f549e 100644 --- a/src/game/weapon_tears.cpp +++ b/generated-src/weapon_tears.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a0d850 void Weapon_Tears::Reset() diff --git a/src/game/weapon_tech_x.cpp b/generated-src/weapon_tech_x.cpp similarity index 84% rename from src/game/weapon_tech_x.cpp rename to generated-src/weapon_tech_x.cpp index 866442c..56aeff7 100644 --- a/src/game/weapon_tech_x.cpp +++ b/generated-src/weapon_tech_x.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a0e260 float10 Weapon_TechX::GetMaxCharge() diff --git a/src/game/weapon_urn_of_souls.cpp b/generated-src/weapon_urn_of_souls.cpp similarity index 98% rename from src/game/weapon_urn_of_souls.cpp rename to generated-src/weapon_urn_of_souls.cpp index 96c52f7..e97a5f0 100644 --- a/src/game/weapon_urn_of_souls.cpp +++ b/generated-src/weapon_urn_of_souls.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 009f3170 undefined4 Weapon_UrnOfSouls::GetMainEntity() diff --git a/src/game/weighted_outcome_picker.cpp b/generated-src/weighted_outcome_picker.cpp similarity index 99% rename from src/game/weighted_outcome_picker.cpp rename to generated-src/weighted_outcome_picker.cpp index b3a2d0c..6b3fda6 100644 --- a/src/game/weighted_outcome_picker.cpp +++ b/generated-src/weighted_outcome_picker.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 0049cbf0 uint WeightedOutcomePicker::PickOutcome(RNG rng) diff --git a/src/game/window.cpp b/generated-src/window.cpp similarity index 96% rename from src/game/window.cpp rename to generated-src/window.cpp index 6a94d8b..9a9e252 100644 --- a/src/game/window.cpp +++ b/generated-src/window.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00a193c0 int Window::get_framebuffer_height() diff --git a/src/game/wisp_entry.cpp b/generated-src/wisp_entry.cpp similarity index 99% rename from src/game/wisp_entry.cpp rename to generated-src/wisp_entry.cpp index 75301c6..5e5b9fd 100644 --- a/src/game/wisp_entry.cpp +++ b/generated-src/wisp_entry.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 007227d0 void WispEntry::constructor() diff --git a/src/game/xml_memory_pool.cpp b/generated-src/xml_memory_pool.cpp similarity index 98% rename from src/game/xml_memory_pool.cpp rename to generated-src/xml_memory_pool.cpp index e82854a..4ece645 100644 --- a/src/game/xml_memory_pool.cpp +++ b/generated-src/xml_memory_pool.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00414730 void xml_memory_pool::clear() diff --git a/src/game/xml_node.cpp b/generated-src/xml_node.cpp similarity index 99% rename from src/game/xml_node.cpp rename to generated-src/xml_node.cpp index 312476a..d4e1dd8 100644 --- a/src/game/xml_node.cpp +++ b/generated-src/xml_node.cpp @@ -1,4 +1,4 @@ -#include "classes.hpp" +#include "classes.h" // 00413bf0 void * xml_node::first_attribute(byte *name, uint nameSize, byte isCaseSensitive) diff --git a/scripts/headers.py b/scripts/headers.py deleted file mode 100644 index 07e16a8..0000000 --- a/scripts/headers.py +++ /dev/null @@ -1,82 +0,0 @@ -# Generates src/structs.hpp: one C++ struct per class from the confirmed fields (zhl_fields.tsv, lua_fields.tsv, -# db/fields.tsv; later files win at the same offset), base-class fields flattened in, gaps as explicit padding, and a -# static_assert on every member offset. Only offsets this exe confirms are in these files, so the header is as trustworthy -# as the evidence behind them. Pointers are uint32_t (the game is 32-bit), so it compiles on any host. -# A "Classsize0x2f00" row (classes.tsv, from the RTTI deleting destructor) pads the struct to its real size. -# A db row with type "-" ("Entity0x2d4- _masswhy") deletes a wrong field from the earlier files. -# Usage: headers.py [--merged fields_out.tsv] out.hpp zhl_fields.tsv lua_fields.tsv db/fields.tsv -# --merged also writes the merged field list (what ApplyTypes.java gets) -import collections, re, sys -args = sys.argv[1:] -merged = args.pop(args.index('--merged') + 1) if '--merged' in args else None -if merged: args.remove('--merged') -out, *srcs = args -SIZE = {'bool': 1, 'char': 1, 'int8_t': 1, 'uint8_t': 1, 'unsigned char': 1, 'short': 2, 'int16_t': 2, 'uint16_t': 2, - 'unsigned short': 2, 'int': 4, 'int32_t': 4, 'uint32_t': 4, 'unsigned int': 4, 'unsigned long': 4, 'long': 4, - 'float': 4, 'uint64_t': 8, 'int64_t': 8, 'unsigned long long': 8, 'long long': 8, 'double': 8, 'Vector': 8} -CTYPE = {'unsigned int': 'uint32_t', 'unsigned long': 'uint32_t', 'long': 'int32_t', 'unsigned short': 'uint16_t', - 'unsigned char': 'uint8_t', 'unsigned long long': 'uint64_t', 'long long': 'int64_t', 'char': 'int8_t'} -fields, bases, sizes, rows = collections.defaultdict(dict), {}, {}, {} -for p in srcs: - for l in open(p): - if l.startswith('#') or not l.strip(): continue - c = l.rstrip('\n').split('\t') - if c[1] == 'base': bases[c[0]] = c[2]; continue - if c[1] == 'size': sizes[c[0]] = int(c[2], 0); continue - if c[2].startswith('- '): - fields[c[0]].pop(int(c[1], 16), None); rows.pop((c[0], int(c[1], 16)), None); continue - rows[(c[0], int(c[1], 16))] = l if l.endswith('\n') else l + '\n' - decl = c[2].replace('const ', '').strip() - count = re.search(r'\[(\w+)\]\s*$', decl) # "int _trinketsID[2]" - if count: decl = decl[:count.start()] - typ, name = decl.rsplit(None, 1) if ' ' in decl else (decl, '_unnamed') - fields[c[0]][int(c[1], 16)] = (typ.strip(), re.sub(r'\W', '', name), c[3] if len(c) > 3 else '', int(count.group(1), 0) if count else 1) -def flat(cls, depth=0): - f = dict(flat(bases[cls], depth + 1)) if cls in bases and depth < 8 else {} - f.update(fields.get(cls, {})) - return f -done, order = {}, [] -STL = [(r'std_string', 0x18), (r'(std_)?vector_bool', 0x10), (r'(std_)?vector_', 0xc), (r'(std_)?deque_', 0x14), (r'std_(map|set|multiset|multimap|list)_', 8)] -def size_of(t): - if t.endswith('*'): return 4 - return SIZE.get(t) or done.get(t) or next((n for p, n in STL if re.match(p, t)), None) -def emit(cls, stack=()): - if cls in done or cls in stack: return - f = flat(cls) - for t, *_ in f.values(): - if t in fields and not t.endswith('*'): emit(t, stack + (cls,)) - lines, asserts, pos = [], [], 0 - for off in sorted(f): - t, name, note, count = f[off] - if off < pos: continue # overlaps the previous member (e.g. a union view): keep the first - if off > pos: lines.append(f' uint8_t _pad_0x{pos:x}[0x{off - pos:x}];') - sz = size_of(t) and size_of(t) * count - dim = f'[{count}]' if count > 1 else '' - nxt = min([o for o in f if o > off], default=None) - if sz and (nxt is None or off + sz <= nxt) and (t in done or t in SIZE or t.endswith('*')): # STL types stay bytes - ct = 'uint32_t' if t.endswith('*') else CTYPE.get(t, t) - cmt = f' // {t}' if t.endswith('*') else '' - lines.append(f' {ct} {name}{dim};{cmt}' + (f' // {note}' if note else '')) - asserts.append(f'static_assert(offsetof({cls}, {name}) == 0x{off:x});') - pos = off + sz - else: # an STL container (its MSVC size) or unknown size: a byte span up to the next member - n = min(sz or 1 << 30, nxt - off if nxt else sz or 4) - lines.append(f' uint8_t {name}[0x{n:x}]; // {t}' + (f'; {note}' if note else '')) - asserts.append(f'static_assert(offsetof({cls}, {name}) == 0x{off:x});') - pos = off + n - if not lines: return - if pos < sizes.get(cls, 0): lines.append(f' uint8_t _pad_0x{pos:x}[0x{sizes[cls] - pos:x}];'); pos = sizes[cls] - if cls in sizes: asserts.append(f'static_assert(sizeof({cls}) == 0x{sizes[cls]:x});' if pos == sizes[cls] else f'// {cls}: fields end at 0x{pos:x}, past its real size 0x{sizes[cls]:x}') - if pos % 4: lines.append(f' uint8_t _pad_0x{pos:x}[0x{4 - pos % 4:x}];'); pos += 4 - pos % 4 # MSVC alignment padding: arrays get the real stride - done[cls] = pos - order.append(f'struct {cls} {{' + (f' // : {bases[cls]} (flattened)' if cls in bases else '') + '\n' + '\n'.join(lines) + '\n};\n' + '\n'.join(asserts) + '\n') -for c in sorted(set(fields) | set(bases)): emit(c) -dupes = [c for c in done if len({v[1] for v in flat(c).values()}) != len(flat(c))] # same name at two offsets -with open(out, 'w') as o: - o.write('// Generated by scripts/headers.py from the confirmed struct fields of isaac-ng.exe v1.9.7.17. Do not edit:\n' - '// add or fix fields in db/fields.tsv and regenerate. Offsets not confirmed in this exe are padding.\n' - '#pragma once\n#include \n#include \n\n#pragma pack(push, 1)\n' - 'struct Vector { float x, y; };\n\n' + '\n'.join(o_ for o_ in order if not o_.startswith('struct Vector ')) + '#pragma pack(pop)\n') -if merged: - with open(merged, 'w') as o: o.writelines([f'{c}\tbase\t{b}\n' for c, b in bases.items()] + [f'{c}\tsize\t{n:#x}\n' for c, n in sizes.items()] + list(rows.values())) -print(f'headers: {len(done)} structs' + (f'; duplicate member names in {dupes}' if dupes else '')) diff --git a/scripts/merge_fields.py b/scripts/merge_fields.py new file mode 100644 index 0000000..beeedb2 --- /dev/null +++ b/scripts/merge_fields.py @@ -0,0 +1,23 @@ +# Merges the confirmed struct fields into the one list ApplyTypes.java and source_tree.py read. +# Inputs in order (later rows win at the same class and offset): zhl_fields.tsv, lua_fields.tsv, db/fields.tsv, class sizes. +# Rows: "Class0x2d4type _namewhy", "ClassbaseBase", "Classsize0x2f00". +# A row whose type is "- " ("Entity0x2d4- _masswhy") deletes a wrong field from the earlier files. +# Usage: merge_fields.py out.tsv in.tsv... +import sys + +out, *sources = sys.argv[1:] +bases = {} +sizes = {} +rows = {} +for path in sources: + for line in open(path): + if line.startswith('#') or not line.strip(): continue + cols = line.rstrip('\n').split('\t') + if cols[1] == 'base': bases[cols[0]] = cols[2]; continue + if cols[1] == 'size': sizes[cols[0]] = int(cols[2], 0); continue + key = (cols[0], int(cols[1], 16)) + if cols[2].startswith('- '): rows.pop(key, None); continue + rows[key] = line if line.endswith('\n') else line + '\n' +with open(out, 'w') as o: + o.writelines([f'{c}\tbase\t{b}\n' for c, b in bases.items()] + [f'{c}\tsize\t{n:#x}\n' for c, n in sizes.items()] + list(rows.values())) +print(f'merge_fields: {len(rows)} fields, {len(bases)} bases, {len(sizes)} sizes') diff --git a/scripts/source_tree.py b/scripts/source_tree.py index 4dd2b4c..b73f684 100644 --- a/scripts/source_tree.py +++ b/scripts/source_tree.py @@ -1,9 +1,10 @@ # Generates the reconstructed C++ tree from what the build knows: RTTI classes (classes.tsv: size from the deleting # destructor, direct bases, vtable slots), confirmed fields (dump/zhl_fields.tsv) and every decompiled function (dump/all.c). -# /classes.hpp one class per type: real bases, the vptr implied, own fields at their exact offsets, padding up to +# /classes.h one class per type: real bases, the vptr implied, own fields at their exact offsets, padding up to # the real size, virtual methods in slot order and the other methods as declarations # /.cpp that class's method bodies as decompiled; Ghidra's Class::method(obj, args) calls become # ((Class *)(obj))->Class::method(args) (a direct call, as in the binary) +# A function src/ took over (a curated file with its address in a comment, // 0040ed50) is declared but not emitted. # Targets 64-bit Linux. The original 32-bit layout is kept as LAYOUT32 asserts, checked with -m32. # --check compiles every .cpp for x86_64, reports how many methods compile and how many raw offset accesses remain # (each one is a 64-bit hazard until it becomes a named field). @@ -17,7 +18,7 @@ POINTER_LIKE = {'EntityPtr'} # REPENTOGON's smart pointer, a raw Entity * in t LIBRARY = re.compile(r'^(std|rapidxml|theoraplayer|luabridge|stb_vorbis|Concurrency)(::|$)') # third party: declared, not reconstructed IDENT = re.compile(r'^~?[A-Za-z_]\w*$') INTRINSIC = re.compile(r'\b(CONCAT|SUB|ZEXT|SEXT|CARRY|SCARRY|SBORROW)(\d+)\(') -CLANG = ['clang++', '--target=x86_64-linux-gnu', '-std=c++17', '-fsyntax-only', '-ferror-limit=0', '-nostdinc++', +CLANG = ['clang++', '--target=x86_64-linux-gnu', '-std=c++20', '-fsyntax-only', '-ferror-limit=0', '-nostdinc++', '-Wno-invalid-offsetof', '-Wno-pragma-once-outside-header', '-w'] PRIMITIVE = {'bool': 1, 'char': 1, 'byte': 1, 'undefined': 1, 'undefined1': 1, 'short': 2, 'ushort': 2, 'word': 2, 'undefined2': 2, 'int': 4, 'uint': 4, 'float': 4, 'dword': 4, 'undefined4': 4, 'long': 4, 'ulong': 4, 'double': 8, 'Vector': 8, @@ -455,7 +456,7 @@ globalDecls += [f'extern {"code" if n.startswith("LAB_") else "undefined4"} {n}; forward = sorted(t for t in used | {c for c in done if '::' not in c} if '::' not in t and t not in PRELUDE_TYPES and t not in enums and t not in typedefs) declarations = ''.join(f'namespace {ns} {{\n' + '\n'.join(d) + '\n}\n' if ns else '\n'.join(d) + '\n' for ns, d in sorted(free.items())) os.makedirs(outDir, exist_ok=True) -with open(outDir + '/classes.hpp', 'w') as o: +with open(outDir + '/classes.h', 'w') as o: o.write(PRELUDE + ''.join(intrinsic_define(n) for n in intrinsics) + '\n#if __SIZEOF_POINTER__ == 4\n#pragma pack(push, 1)\n#endif\n' + ''.join(f'struct {t};\n' for t in forward) + '\n' + '\n'.join(aliases) + '\n\n' + '\n'.join(order) + '#if __SIZEOF_POINTER__ == 4\n#pragma pack(pop)\n#endif\n\n' + declarations + '\n' + '\n'.join(globalDecls) + '\n') @@ -463,10 +464,13 @@ with open(outDir + '/classes.hpp', 'w') as o: # One .cpp per class: each body under the declaration it was declared with; a renamed `this` gets an alias. members = {f'{f[0]}::{f[1]}' for f in funcs.values() if f[3] == '__thiscall' and f[0] in done} spans, files = collections.defaultdict(list), {} +srcDir = os.path.join(os.path.dirname(os.path.abspath(outDir)), 'src') +curated = {int(a, 16) for root, _, names_ in os.walk(srcDir) for n in names_ if n.endswith(('.cpp', '.h')) + for a in re.findall(r'//\s*([0-9a-f]{8})\b', open(os.path.join(root, n), errors='replace').read())} for cls in [c for c in done if not LIBRARY.match(c)]: - parts, line = ['#include "classes.hpp"\n'], 2 + parts, line = ['#include "classes.h"\n'], 2 for addr, (_, method, ret, cc, params) in methods.get(cls, []): - if addr not in defined: continue + if addr not in defined or addr in curated: continue decl = re.sub(r'^(virtual|static) |\s*override(?=;)|;$', '', defined[addr]) name = re.search(r'(~?\w+)\(', decl).group(1) thisParam = funcs[addr][5] @@ -482,10 +486,10 @@ for cls in [c for c in done if not LIBRARY.match(c)]: files[cls] = path os.makedirs(os.path.dirname(f'{outDir}/{path}') or outDir, exist_ok=True) open(f'{outDir}/{path}', 'w').write(''.join(parts)) -print(f'source_tree: {len(done)} classes, {sum(1 for c in done if size.get(c))} sized, {sum(len(v) for v in methods.values())} methods,' +print(f'source_tree: {len(curated)} functions taken over by src/, {len(done)} classes, {sum(1 for c in done if size.get(c))} sized, {sum(len(v) for v in methods.values())} methods,' f' {sum(len(s) for s in spans.values())} bodies in {len(files)} .cpp files') -if isCheck: # per method: does its body compile against classes.hpp? +if isCheck: # per method: does its body compile against classes.h? def file_check(cls): result = subprocess.run(CLANG + ['-I', outDir, f'{outDir}/{files[cls]}'], capture_output=True, text=True) bad = collections.Counter() @@ -498,7 +502,7 @@ if isCheck: # per method: does its body compile against classes.hpp? with concurrent.futures.ThreadPoolExecutor(os.cpu_count()) as pool: results = list(pool.map(file_check, files)) total = sum(len(spans[c]) for c in files) clean = sum(1 for c, bad in results for lo, hi, a in spans[c] if not bad.get(a)) - layout = subprocess.run(CLANG[:1] + ['--target=i686-linux-gnu'] + CLANG[2:] + ['-x', 'c++', f'{outDir}/classes.hpp'], capture_output=True, text=True) + layout = subprocess.run(CLANG[:1] + ['--target=i686-linux-gnu'] + CLANG[2:] + ['-x', 'c++', f'{outDir}/classes.h'], capture_output=True, text=True) hazards = sum(len(re.findall(r'GHIDRA_CAST\([^;]*?\) \+ (?:0x[0-9a-f]+|\d+)\)', open(f'{outDir}/{f}').read())) for f in files.values()) print(f'source_tree --check: {clean}/{total} method bodies compile for x86_64 ({100 * clean / max(total, 1):.1f}%),' f' {hazards} raw offset accesses, 32-bit layout asserts {"hold" if layout.returncode == 0 else "FAIL"}') diff --git a/src/log.h b/src/log.h new file mode 100644 index 0000000..3a99168 --- /dev/null +++ b/src/log.h @@ -0,0 +1,11 @@ +#pragma once + +// The levels KAGE_LogMessage prints with, each with its own prefix. +enum LogLevel : unsigned int +{ + LOG_INFO = 1, + LOG_NET = 2, + LOG_WARN = 4, + LOG_ERROR = 8, + LOG_ASSERT = 16 +}; diff --git a/src/rng.cpp b/src/rng.cpp new file mode 100644 index 0000000..ff1cc49 --- /dev/null +++ b/src/rng.cpp @@ -0,0 +1,79 @@ +#include "classes.h" +#include "log.h" + +// The xorshift triples a seed is paired with, by shift index. +constexpr unsigned int SHIFT_COUNT = 81; +constexpr unsigned int SHIFTS[SHIFT_COUNT][3] = { + {1, 3, 10}, {1, 5, 16}, {1, 5, 19}, {1, 9, 29}, {1, 11, 6}, {1, 11, 16}, + {1, 19, 3}, {1, 21, 20}, {1, 27, 27}, {2, 5, 15}, {2, 5, 21}, {2, 7, 7}, + {2, 7, 9}, {2, 7, 25}, {2, 9, 15}, {2, 15, 17}, {2, 15, 25}, {2, 21, 9}, + {3, 1, 14}, {3, 3, 26}, {3, 3, 28}, {3, 3, 29}, {3, 5, 20}, {3, 5, 22}, + {3, 5, 25}, {3, 7, 29}, {3, 13, 7}, {3, 23, 25}, {3, 25, 24}, {3, 27, 11}, + {4, 3, 17}, {4, 3, 27}, {4, 5, 15}, {5, 3, 21}, {5, 7, 22}, {5, 9, 7}, + {5, 9, 28}, {5, 9, 31}, {5, 13, 6}, {5, 15, 17}, {5, 17, 13}, {5, 21, 12}, + {5, 27, 8}, {5, 27, 21}, {5, 27, 25}, {5, 27, 28}, {6, 1, 11}, {6, 3, 17}, + {6, 17, 9}, {6, 21, 7}, {6, 21, 13}, {7, 1, 9}, {7, 1, 18}, {7, 1, 25}, + {7, 13, 25}, {7, 17, 21}, {7, 25, 12}, {7, 25, 20}, {8, 7, 23}, {8, 9, 23}, + {9, 5, 14}, {9, 5, 25}, {9, 11, 19}, {9, 21, 16}, {10, 9, 21}, {10, 9, 25}, + {11, 7, 12}, {11, 7, 16}, {11, 17, 13}, {11, 21, 13}, {12, 9, 23}, {13, 3, 17}, + {13, 3, 27}, {13, 5, 19}, {13, 17, 15}, {14, 1, 15}, {14, 13, 15}, {15, 1, 29}, + {17, 15, 20}, {17, 15, 23}, {17, 15, 26}, +}; +// Just under 1 / 2^32, so a float drawn from any seed stays below 1. +constexpr float FLOAT_SCALE = 2.3283062e-10f; + +// 007e8fe0 Seeds the generator, clamping the shift index to the last triple. +void RNG::SetSeed(uint seed, uint shiftIndex) +{ + unsigned int index = shiftIndex < SHIFT_COUNT ? shiftIndex : SHIFT_COUNT - 1; + + _seed = seed; + _shift1 = SHIFTS[index][0]; + _shift2 = SHIFTS[index][1]; + _shift3 = SHIFTS[index][2]; +} + +// 007e8f90 Seeds the generator as its constructor does, asserting on a shift index past the table. +void RNG::game_constructor(uint seed, uint shiftIndex) +{ + if (shiftIndex >= SHIFT_COUNT) KAGE_LogMessage(LOG_ASSERT, (byte*)"RNG: Invalid ShiftIdx\n"); + SetSeed(seed, shiftIndex); +} + +// 007e90f0 Steps the seed through its xorshift and returns it. +// The game stops in the debugger on a zero seed, which never moves again. +uint RNG::Next() +{ + if (_seed == 0) KAGE_LogMessage(LOG_ASSERT, (byte*)"RNG Seed is zero!\n"); + + _seed ^= _seed >> _shift1; + _seed ^= _seed << _shift2; + _seed ^= _seed >> _shift3; + return _seed; +} + +// 007e9020 A number below max, or 0 for a max of 0. +uint RNG::RandomInt(uint max) +{ + uint value = Next(); + return max == 0 ? 0 : value % max; +} + +// 007e9080 A number in [0, 1). +float RNG::RandomFloat() +{ + return (float)Next() * FLOAT_SCALE; +} + +// 005cc070 Shuffles [begin, end) in place, from the back, each element swapped with one at or before it. +void RNG::Shuffle(RNG* rng, int* begin, int* end) +{ + for (long i = end - begin - 1; i > 0; i--) + { + uint other = rng->Next() % (uint)(i + 1); + int value = begin[i]; + + begin[i] = begin[other]; + begin[other] = value; + } +} diff --git a/src/structs.hpp b/src/structs.hpp deleted file mode 100644 index 1976778..0000000 --- a/src/structs.hpp +++ /dev/null @@ -1,7415 +0,0 @@ -// Generated by scripts/headers.py from the confirmed struct fields of isaac-ng.exe v1.9.7.17. Do not edit: -// add or fix fields in db/fields.tsv and regenerate. Offsets not confirmed in this exe are padding. -#pragma once -#include -#include - -#pragma pack(push, 1) -struct Vector { float x, y; }; - -struct AnimationState { - uint32_t _animation; // ANM2* // ANM2 ctor 0x4074c0 sets owner=this; copy ctor 0x4086e0(owner, src) - uint32_t _animData; // AnimationData* // SetAnimationData 0x408830 stores arg - uint32_t _layerFrames; // int* // SetAnimationData 0x408830 allocates anim->layerAnimCount ints - uint32_t _nullLayerFrames; // int* // SetAnimationData 0x408830 allocates anim->nullAnimCount ints - float _animFrame; // SetAnimationData 0x408830 = -1.0f; SetFrame 0x408e00 - bool _isPlaying; // Update 0x409030 / ANM2::IsPlaying 0x40a4d0 - uint8_t _pad_0x15[0x3]; - int _currentlyTriggeredEvents; // IsEventTriggered 0x40add0 tests bit - int _previouslyTriggeredEvents; // WasEventTriggered 0x40ae70 tests bit -}; -static_assert(offsetof(AnimationState, _animation) == 0x0); -static_assert(offsetof(AnimationState, _animData) == 0x4); -static_assert(offsetof(AnimationState, _layerFrames) == 0x8); -static_assert(offsetof(AnimationState, _nullLayerFrames) == 0xc); -static_assert(offsetof(AnimationState, _animFrame) == 0x10); -static_assert(offsetof(AnimationState, _isPlaying) == 0x14); -static_assert(offsetof(AnimationState, _currentlyTriggeredEvents) == 0x18); -static_assert(offsetof(AnimationState, _previouslyTriggeredEvents) == 0x1c); - -struct ColorMod { - float _tint[4]; // Color::R/G/B/A getters read +0x0..+0xc - float _colorize[4]; // Color::SetColorize 00682fb0 writes +0x10..+0x1c - float _offset[3]; // Color::RO/GO/BO getters read +0x20..+0x28 -}; -static_assert(offsetof(ColorMod, _tint) == 0x0); -static_assert(offsetof(ColorMod, _colorize) == 0x10); -static_assert(offsetof(ColorMod, _offset) == 0x20); - -struct ANM2 { - uint8_t _filename[0x18]; // std_string; ANM2::Load assigns, AnmCache::AddRef/RemoveRef(this) 0x40e110/0x40e2b0, GetFilename 0x4312e0 (src/anm2/docs/cache_load_decomp.md s2) - uint8_t _animDefaultName[0x18]; // std_string; AnmCache::Load 0x40db90 assigns default anim name; GetDefaultAnimationName 0x4a5cf0 returns &+0x18 - AnimationState _animState; // ctor 0x4074c0 sets main.owner=this; dtor 0x408170; copy 0x4086e0 - AnimationState _overlayAnimState; // RemoveOverlay 0x40ac60 = overlay(+0x50).SetAnimationData(nullptr) - bool _overlayRenderFirst; // SetOverlayRenderPriority 0x431300; Render 0x40a0d0 draws overlay first if set; Reset 0x407f10 - uint8_t _pad_0x71[0x3]; - uint32_t _animData; // AnimationData* // AnmCache::Load 0x40db90 copies cache animations ptr - int _animCount; // AnmCache::Load 0x40db90; PlayRandom 0x40a2b0 rand % +0x78 - uint32_t _layerState; // LayerState* // AnmCache::Load 0x40db90 new LayerState[cnt] (stride 0xa0); ctor 0x4074c0 nulls - uint32_t _layerCount; // AnmCache::Load 0x40db90; GetLayerCount 0x440e40 - uint32_t _nullLayerNames; // std_string* // AnmCache::Load 0x40db90 copies cache nullNames - uint32_t _numNullLayers; // AnmCache::Load 0x40db90 copies cache nullCount - uint32_t _eventNames; // std_string* // AnmCache::Load 0x40db90 copies cache eventNames - uint32_t _numEvents; // AnmCache::Load 0x40db90 copies cache eventCount - Vector _offset; // Lua Sprite.Offset get 0x49cb40 (&+0x94) / set 0x456340; Reset 0x407f10 = Vector::Zero - Vector _scale; // Lua Sprite.Scale get 0x417200 / set 0x420170; Reset = Vector::One - float _rotation; // Lua Sprite.Rotation get 0x417210 / set 0x43ee80 - ColorMod _color; // Lua Sprite.Color get 0x407410 / set 0x4073d0 - ColorMod _championColor; // second ColorMod: ctor 0x4074c0, Reset 0x407f10 (alpha 0), copied/swapped like Color - bool _flipX; // Lua FlipX get 0x407420 / set 0x435c60 - bool _flipY; // Lua FlipY get 0x407430 / set 0x505b50 - uint8_t _pad_0x102[0x2]; - float _playbackSpeed; // Lua PlaybackSpeed get 0x456360 / set 0x440e50; Reset = 1.0 - uint8_t _pad_0x108[0x1]; - bool _loaded; // IsLoaded 0x420160; Render 0x40a0d0 returns early if 0 - uint8_t _pad_0x10a[0x2]; - int _shadowLayerIndex; // not in REPENTOGON: Reset 0x407f10 = -1; AnmCache::Load 0x40db90 sets it to the layer named "shadow" - uint32_t _bitflags; // renderFlags: OR-ed with LayerState+0x8c in Render (0x4091eb, 0x409a63, 0x409cc0); Load sets 0x400/0x800 -}; -static_assert(offsetof(ANM2, _filename) == 0x0); -static_assert(offsetof(ANM2, _animDefaultName) == 0x18); -static_assert(offsetof(ANM2, _animState) == 0x30); -static_assert(offsetof(ANM2, _overlayAnimState) == 0x50); -static_assert(offsetof(ANM2, _overlayRenderFirst) == 0x70); -static_assert(offsetof(ANM2, _animData) == 0x74); -static_assert(offsetof(ANM2, _animCount) == 0x78); -static_assert(offsetof(ANM2, _layerState) == 0x7c); -static_assert(offsetof(ANM2, _layerCount) == 0x80); -static_assert(offsetof(ANM2, _nullLayerNames) == 0x84); -static_assert(offsetof(ANM2, _numNullLayers) == 0x88); -static_assert(offsetof(ANM2, _eventNames) == 0x8c); -static_assert(offsetof(ANM2, _numEvents) == 0x90); -static_assert(offsetof(ANM2, _offset) == 0x94); -static_assert(offsetof(ANM2, _scale) == 0x9c); -static_assert(offsetof(ANM2, _rotation) == 0xa4); -static_assert(offsetof(ANM2, _color) == 0xa8); -static_assert(offsetof(ANM2, _championColor) == 0xd4); -static_assert(offsetof(ANM2, _flipX) == 0x100); -static_assert(offsetof(ANM2, _flipY) == 0x101); -static_assert(offsetof(ANM2, _playbackSpeed) == 0x104); -static_assert(offsetof(ANM2, _loaded) == 0x109); -static_assert(offsetof(ANM2, _shadowLayerIndex) == 0x10c); -static_assert(offsetof(ANM2, _bitflags) == 0x110); - -struct AchievementOverlay_Entry { - int _id; // AchievementOverlay::Update 00931ba0 logs it as the %d of "No sprite for achievement %d (%s)" - uint8_t _name[0x18]; // std_string; AchievementOverlay::Update 00931ba0 logs it (heap ptr when capacity +0x14 > 0xf) as the %s - uint8_t _gfx[0x18]; // std_string; AchievementOverlay::Update 00931ba0 tests its size (+0x10) and passes it to Sprite::ReplaceSpritesheet(layer 3) -}; -static_assert(offsetof(AchievementOverlay_Entry, _id) == 0x0); -static_assert(offsetof(AchievementOverlay_Entry, _name) == 0x4); -static_assert(offsetof(AchievementOverlay_Entry, _gfx) == 0x1c); - -struct AchievementOverlay { - uint8_t _queue[0x14]; // std_deque_int; AchievementOverlay::Update 00931ba0 pops the front id when idle: map +4 [(off>>2) & (mapSize+8 - 1)][off & 3], then size (+0x10) -1 and offset (+0xc) +1 (0 when empty): MSVC deque layout - int _currentEntry; // AchievementOverlay::Update 00931ba0 stores the popped id and indexes _entries (+0x134 + it*0x34) for the sprite and the "No sprite for achievement %d (%s)" log - int _frame; // AchievementOverlay::Update 00931ba0 zeroes it on entering state 2 and plays "Dissapear" once it passes 0x5a (or MENUCONFIRM) - int _state; // AchievementOverlay::Update 00931ba0: 0 idle (pops the queue, -> 1 "Appear"), 1 -> 2 "Idle" + sound 8 when the anim ends, 2 -> 3 "Dissapear", 3 -> 0 - ANM2 _sprite; // AchievementOverlay::Update 00931ba0 ANM2::Play(this+0x20, Appear/Idle/Dissapear), GetLayer 0/3, ReplaceSpritesheet layer 3, LoadGraphics; Manager ctor builds an ANM2 at Overlay+0x20 - AchievementOverlay_Entry _entries[642]; // AchievementOverlay::Update 00931ba0 indexes +0x134 + id*0x34 (id at +0, name std::string +0x138, gfx std::string +0x150); 0x134 + 0x282*0x34 = 0x839c = _isPopupBlocked - bool _isPopupBlocked; // Manager::Update 00954cd0 only calls AchievementOverlay::Update and Manager::Render 009555c0 only draws the popup while Manager+0x29fb8 (= Overlay+0x839c, the byte after the 0x282 x 0x34 entry array) is 0; Manager::ShowCutscene 00958e60, BossOverlay::update, Room::SpawnClearAward set 1; Game::Update 006fadc0 clears; AchievementOverlay::load_graphics 00931550 and setter 005cd800 clear this+0x839c - uint8_t _pad_0x839d[0x3]; -}; -static_assert(offsetof(AchievementOverlay, _queue) == 0x0); -static_assert(offsetof(AchievementOverlay, _currentEntry) == 0x14); -static_assert(offsetof(AchievementOverlay, _frame) == 0x18); -static_assert(offsetof(AchievementOverlay, _state) == 0x1c); -static_assert(offsetof(AchievementOverlay, _sprite) == 0x20); -static_assert(offsetof(AchievementOverlay, _entries) == 0x134); -static_assert(offsetof(AchievementOverlay, _isPopupBlocked) == 0x839c); - -struct ActiveItemDesc { - int _item; - int _unk; // Entity_Player::AddCollectible (0075f0e0) writes player+0x1584+slot*0x20 alongside +0xc/+0x10/+0x18/+0x1c when installing an active; SwapActiveItems (007a4760) swaps it with slot 1 (+0x15a4); Store/RestoreGameState save it - int _charge; - int _batteryCharge; - int _subCharge; - int _timeRechargeCooldown; // Entity_Player::ControlActiveItem (00791a40) sets desc+0x14 to 9/0xb/0xf after use, decrements it each frame for all 4 slots (player+0x1594 stride 0x20) and only advances a chargeType==1 (timed) item while it is < 1 - int _partialCharge; - int _varData; -}; -static_assert(offsetof(ActiveItemDesc, _item) == 0x0); -static_assert(offsetof(ActiveItemDesc, _unk) == 0x4); -static_assert(offsetof(ActiveItemDesc, _charge) == 0x8); -static_assert(offsetof(ActiveItemDesc, _batteryCharge) == 0xc); -static_assert(offsetof(ActiveItemDesc, _subCharge) == 0x10); -static_assert(offsetof(ActiveItemDesc, _timeRechargeCooldown) == 0x14); -static_assert(offsetof(ActiveItemDesc, _partialCharge) == 0x18); -static_assert(offsetof(ActiveItemDesc, _varData) == 0x1c); - -struct Ambush { - uint8_t _pad_0x0[0xc]; - uint8_t _bossRushWaves[0xc]; // std_vector_std_vector_BossRushEntry; Ambush::SpawnBossrushWave 00833c40 pops the last 0xc-byte element (itself a vector of 12-byte entries) of begin +0xc / end +0x10 _bossesPerWave times; Ambush::Update 00834350 tests it empty in the boss rush room (type 0x11); StartChallenge 00833420 - int _maxWaves; // ? HUD::Render 009a3eb0 (9a42d9) prints "%d/%d" with Game+0x265ec (_currentWave) over Game+0x265e0 (= Ambush+0x18) - uint8_t _pad_0x1c[0x4]; - bool _isActive; // Room::IsAmbushActive 0081e240 returns byte Game+0x265e8 (_ambush+0x20); Room::Update 00802980 calls Ambush::Update while set in room types 0xb/0x11; GridEntity_Door::Open 00710dd0 stays shut in type 0xb while set; HUD::Render draws the wave counter while set; FUN_007eb010 / ctor clear it, store_game_state saves it - uint8_t _pad_0x21[0x3]; - int _currentWave; // HUD::Render 009a3eb0 prints it as the %d of "%d/%d" waves; Game::store_game_state 006f9000 saves max(it-1, 0); room reset FUN_007eb010 and Game ctor 006f1020 zero Game+0x265ec -}; -static_assert(offsetof(Ambush, _bossRushWaves) == 0xc); -static_assert(offsetof(Ambush, _maxWaves) == 0x18); -static_assert(offsetof(Ambush, _isActive) == 0x20); -static_assert(offsetof(Ambush, _currentWave) == 0x24); - -struct RoomDescriptor { - int32_t GridIndex; - int32_t SafeGridIndex; - int32_t ListIndex; - int32_t Dimension; // ctor zeroes +0xc between ListIndex and Data; Room::update_door_transitions (007f01c0) / Entity_NPC::HandleCollision read the target desc+0xc as the dimension with its GridIndex; RoomTransition::ChangeRoom compares two descs' +0xc - uint32_t Data; // RoomConfig_Room* - uint32_t OverrideData; // RoomConfig_Room* - int32_t AllowedDoors; - int _doors[8]; // RoomDescriptor::constructor 006ef590 sets the 8 dwords 0x1c..0x38 to -1; Level::ChangeRoom 0073fc80 / UncoverHiddenDoor 0074a1b0 read +0x1c+slot*4 as the neighbouring room index (GetRoomByIdx); MakeRedRoomDoor 0074d010 writes -2 or the new room's GridIndex - int32_t DisplayFlags; - int32_t VisitedCount; - int32_t Flags; - int16_t TotalMoneySpent; // FUN_007d8630 (player coin spend, Keeper's Sack) adds the amount to short (Room->_descriptor)+0x48 and unlocks achievement 0x246 once it exceeds 0x27; ctor zeroes it - int16_t ClearCount; - int32_t GreedSubType; // Level::generate_greed (0073e0a0) stores the chosen greed room subtype (4 or 0xb) in current desc+0x4c when 0, else reuses it as the RoomConfig::GetRandomRoom subtype; ctor zeroes it - int16_t PoopCount; - int16_t TKeeperCoinSpawns; // Entity_Pickup::Update (006bbdc0) for player type 0x21 (Tainted Keeper): if the room was visited before, stops at short desc+0x52 > 9, else rolls 1/(n+1) and increments it per enemy coin spawn - int32_t PitsCount; - int32_t DecorationSeed; - int32_t SpawnSeed; - int32_t AwardSeed; - uint32_t BossDeathSeed; // Room::TriggerBossDeath (007fec00, log "TriggerBossDeath: %d bosses remaining.") loads (Room->_descriptor)+0x64 at 007fed23 as the RNG seed for the last-boss-death reward (Game+0x265f4 overrides); ctor zeroes it - uint8_t SavedGridEntities[0xc]; // vector_GridEntityDesc; RoomDescriptor::constructor (006ef590) sizes the vector at +0x68/+0x6c/+0x70 to 0x1c0 (grid cells) x 0x20 GridEntityDesc, each with seed 0x16a9de81 at +0x10/+0x1c - uint8_t SavedEntities[0xc]; // vector_EntitySaveState; Room::RestoreState (007eff50) respawns each 0x78-byte EntitySaveState in desc+0x74..+0x78 via Game::SpawnEx + Entity_Pickup::RestoreState, then clears it - uint8_t RestrictedGridIndexes[0x8]; // std_set_int; ctor allocates a 0x14-byte std::set head at +0x80 (size +0x84); grid-bound enemies (NpcAI POKY/SPIKEBALL/STONEHEAD/CONSTANT_STONE_SHOOTER/BOMB_GRIMACE/GUTS) std::set::insert their _spawnGridIndex into current desc+0x80 on death; Room::Init find_node's it - uint8_t SavedEffects[0xc]; // vector_EntitySaveState; Game::spawn_bomb_crater (00703190) appends the crater effect's 0x78-byte save state to (Room->_descriptor)+0x88..+0x90, capped at 0x80 entries - uint8_t _pad_0x94[0x18]; - int16_t ShopItemIdx; - int16_t ShopItemDiscountIdx; - int32_t DeliriumDistance; - int32_t Group; // RoomDescriptor::constructor 006ef590 sets +0xb4 = -1; operator_assign 007387d0 copies it as last dword (stride 0xb8); Level::GetRandomRoomIndex 00740860 only picks rooms whose +0xb4 is -1 or equals the current room's -}; -static_assert(offsetof(RoomDescriptor, GridIndex) == 0x0); -static_assert(offsetof(RoomDescriptor, SafeGridIndex) == 0x4); -static_assert(offsetof(RoomDescriptor, ListIndex) == 0x8); -static_assert(offsetof(RoomDescriptor, Dimension) == 0xc); -static_assert(offsetof(RoomDescriptor, Data) == 0x10); -static_assert(offsetof(RoomDescriptor, OverrideData) == 0x14); -static_assert(offsetof(RoomDescriptor, AllowedDoors) == 0x18); -static_assert(offsetof(RoomDescriptor, _doors) == 0x1c); -static_assert(offsetof(RoomDescriptor, DisplayFlags) == 0x3c); -static_assert(offsetof(RoomDescriptor, VisitedCount) == 0x40); -static_assert(offsetof(RoomDescriptor, Flags) == 0x44); -static_assert(offsetof(RoomDescriptor, TotalMoneySpent) == 0x48); -static_assert(offsetof(RoomDescriptor, ClearCount) == 0x4a); -static_assert(offsetof(RoomDescriptor, GreedSubType) == 0x4c); -static_assert(offsetof(RoomDescriptor, PoopCount) == 0x50); -static_assert(offsetof(RoomDescriptor, TKeeperCoinSpawns) == 0x52); -static_assert(offsetof(RoomDescriptor, PitsCount) == 0x54); -static_assert(offsetof(RoomDescriptor, DecorationSeed) == 0x58); -static_assert(offsetof(RoomDescriptor, SpawnSeed) == 0x5c); -static_assert(offsetof(RoomDescriptor, AwardSeed) == 0x60); -static_assert(offsetof(RoomDescriptor, BossDeathSeed) == 0x64); -static_assert(offsetof(RoomDescriptor, SavedGridEntities) == 0x68); -static_assert(offsetof(RoomDescriptor, SavedEntities) == 0x74); -static_assert(offsetof(RoomDescriptor, RestrictedGridIndexes) == 0x80); -static_assert(offsetof(RoomDescriptor, SavedEffects) == 0x88); -static_assert(offsetof(RoomDescriptor, ShopItemIdx) == 0xac); -static_assert(offsetof(RoomDescriptor, ShopItemDiscountIdx) == 0xae); -static_assert(offsetof(RoomDescriptor, DeliriumDistance) == 0xb0); -static_assert(offsetof(RoomDescriptor, Group) == 0xb4); - -struct BackwardsStageDesc { - RoomDescriptor _bossRooms[2]; // Game::SaveBackwardsStage 00708050 (desc = Game::get_backwards_stage 00738340 base): copy_room_list into boss room i, frees/zeroes the RoomDescriptor data pointer at desc+0x10+i*0xb8 (write_room_config first) - uint8_t _bossRoomConfigs[0x18]; // GameStateRoomConfig; Game::SaveBackwardsStage 00708050 Level::write_room_config(bossRoom[i].data, desc+0x170+i*0xc) - RoomDescriptor _treasureRooms[2]; // Game::SaveBackwardsStage 00708050: for room type 4 (treasure) copy_room_list into treasure room i, data pointer at desc+0x198+i*0xb8 - uint8_t _treasureRoomConfigs[0x18]; // GameStateRoomConfig; Game::SaveBackwardsStage 00708050 Level::write_room_config(treasureRoom[i].data, desc+0x2f8+i*0xc) - uint32_t _bossRoomsCount; // Game::SaveBackwardsStage 00708050 sets desc+0x310 = 1 (last boss room), increments it per extra type-5 room while < 2; Level::place_rooms_backwards 00741e60 reads it - uint32_t _treasureRoomsCount; // Game::SaveBackwardsStage 00708050 zeroes desc+0x314 and increments it per type-4 (treasure) room while < 2; Level::place_rooms_backwards 00741e60 reads it - uint32_t _stageType; // Game::SaveBackwardsStage 00708050 stores Game _stageType at desc+0x318 - bool _isXL; // Game::SaveBackwardsStage 00708050 sets byte desc+0x31c = (_bossRoomsCount > 1); stride 800 (get_backwards_stage 00738340) - uint8_t _pad_0x31d[0x3]; -}; -static_assert(offsetof(BackwardsStageDesc, _bossRooms) == 0x0); -static_assert(offsetof(BackwardsStageDesc, _bossRoomConfigs) == 0x170); -static_assert(offsetof(BackwardsStageDesc, _treasureRooms) == 0x188); -static_assert(offsetof(BackwardsStageDesc, _treasureRoomConfigs) == 0x2f8); -static_assert(offsetof(BackwardsStageDesc, _bossRoomsCount) == 0x310); -static_assert(offsetof(BackwardsStageDesc, _treasureRoomsCount) == 0x314); -static_assert(offsetof(BackwardsStageDesc, _stageType) == 0x318); -static_assert(offsetof(BackwardsStageDesc, _isXL) == 0x31c); - -struct BitSet128 { - uint64_t _l; // Lua BitSet128.l via binder 008774f0: getter 008bc3c0 pushes two dwords via FUN_0085c030 (64-bit pushinteger), setter stores 64-bit checkinteger - uint64_t _h; // Lua BitSet128.h via binder 008774f0: getter 008bc3c0 pushes two dwords via FUN_0085c030 (64-bit pushinteger), setter stores 64-bit checkinteger -}; -static_assert(offsetof(BitSet128, _l) == 0x0); -static_assert(offsetof(BitSet128, _h) == 0x8); - -struct BossPool { - uint8_t _pad_0x0[0x8ac]; - uint8_t _removedBosses[0x10]; // vector_bool; Level::ForceHorsemanBoss 007481d0 tests bits 9..0xc / 0x26 in *(Game+0x1b81c) (=_bossPool+0x8ac data) and sets the chosen boss id bit; Room::SpawnEntry 007ed310 tests bit 0x18; ctor 006f1020 zeroes it (REPENTOGON BossPool _removedBosses 0x8ac, size 0x8cc) -}; -static_assert(offsetof(BossPool, _removedBosses) == 0x8ac); - -struct Camera { - uint8_t _aimOffsetBuffer[16]; // ring buffer {Vector* data, int capacity, int count, int head} of 60 aim/focus-entity look-ahead offsets: ctor 009428d0 fills 0x3c, update_focus_position 009439d0 pushes aimDirection*35 (or knife/Epic Fetus focus offset), FUN_00943190 averages it - uint8_t _velocityOffsetBuffer[16]; // ring buffer (90) of player velocity*4.5 look-ahead: update_focus_position 009439d0 pushes it, averages with FUN_00943190; SnapToPosition 00944d40 refills with zero - uint8_t _enemyOffsetBuffer[16]; // ring buffer (300) of FUN_00942f20 result (average offset of active enemies type 10..999 from the players' center, room+0x125c entity list); update_focus_position 009439d0 pushes/averages it - uint8_t _playerSpreadBuffer[16]; // ring buffer (15) of the average (player pos - players center)*0.25 over players: update_focus_position 009439d0 pushes/averages it - uint8_t _shakeOffsetBuffer[16]; // ring buffer (4) of screen-shake offsets: update_follow 009446e0 / update_focus_position push zero when Game+0x26508 < 1, else a random 10px offset scaled by timer/11, average written to Game._screenShakeOffset (0x2650c) - uint8_t _focusPositionBuffer[16]; // ring buffer (120) of focus positions: SetFocusPosition 00944d10 pushes when !_shouldOverride; update_follow 009446e0 follows its last entry; ctor fills with -(1,1) sentinels replaced by the target in update_focus_position - Vector _playersCenter; // update_focus_position 009439d0 stores players_center_position() here at the end of each update - uint32_t _room; // Room* // ctor 009428d0 stores its Room* argument; get_clamp_bounds 009432f0 / ClampedToRoom 00943490 read room bounds (+0x14..+0x20, +0x11fc) through it - Vector _position; // camera position: ctor/SnapToPosition 00944d40/update_follow 009446e0 write it (lerp by +0x90) and copy it to Room+0x1204 (_renderScrollOffset); IsPosVisible 00944a40 tests against it - Vector _screenAnchor; // ctor 009428d0 sets (1.0*0.5, 1.0*0.5); ClampedToRoom 00943490 / update_focus_position compute pos = screenSize*anchor - ... - Vector _unk7c; // ? only zeroed in ctor 009428d0 (pair with +0x84); no reader found in the dump - Vector _unk84; // ? only zeroed in ctor 009428d0; no reader found in the dump - bool _shouldOverride; // Camera::SetFocusPosition 00944d10: if !+0x8c push pos into ring +0x50 and set +0x8c=1; Camera::update_follow 009446e0 follows ring +0x50 instead of players when set; Camera::ClampedToRoom 00943490 skips X clamp - uint8_t _pad_0x8d[0x3]; - float _followLerp; // ctor 009428d0 sets 0.1 (this[1]+3); update_follow 009446e0 moves it +-0.01 within 0.1..0.5 by target distance and lerps _position by it -}; -static_assert(offsetof(Camera, _aimOffsetBuffer) == 0x0); -static_assert(offsetof(Camera, _velocityOffsetBuffer) == 0x10); -static_assert(offsetof(Camera, _enemyOffsetBuffer) == 0x20); -static_assert(offsetof(Camera, _playerSpreadBuffer) == 0x30); -static_assert(offsetof(Camera, _shakeOffsetBuffer) == 0x40); -static_assert(offsetof(Camera, _focusPositionBuffer) == 0x50); -static_assert(offsetof(Camera, _playersCenter) == 0x60); -static_assert(offsetof(Camera, _room) == 0x68); -static_assert(offsetof(Camera, _position) == 0x6c); -static_assert(offsetof(Camera, _screenAnchor) == 0x74); -static_assert(offsetof(Camera, _unk7c) == 0x7c); -static_assert(offsetof(Camera, _unk84) == 0x84); -static_assert(offsetof(Camera, _shouldOverride) == 0x8c); -static_assert(offsetof(Camera, _followLerp) == 0x90); - -struct ChallengeParam { - uint8_t _name[0x18]; // std_string; challenges_xml_load 009569f0: "name" attribute std::string::assign with ECX = the params local (LEA ECX,[EBP-0xd0] at 00956d0b, same as the ChallengeParams ctor call 00956c36); ChallengeParams ctor 00424310 / copy ctor 0095c050 string at +0 - uint8_t _roomset[0x8]; // std_set_int; challenges_xml_load 009569f0: "roomfilter" values inserted into the set at params+0x18 (LEA ECX,[EBP-0xb8] before CALL 00428560 at 00957682); ctor 00424310 allocates its head node; Reset 00424440 erases it - uint8_t _collectibleList[0xc]; // std_vector_int; challenges_xml_load 009569f0 pushes "startingitems" ids into the vector at params+0x20 (end ptr local +0x24); copy ctor 0095c050 std::vector copy at +0x20 - uint8_t _trinketList[0xc]; // std_vector_int; challenges_xml_load 009569f0 pushes "startingtrinkets" ids into the vector at params+0x2c (end ptr local +0x30); Reset 00424440 sets +0x30 = +0x2c - int _startingPill; // challenges_xml_load 009569f0 stores atoi("startingpill") at params+0x38; Reset 00424440 = -1 - int _startingCard; // challenges_xml_load 009569f0 stores atoi("startingcard") at params+0x3c - int _endStage; // challenges_xml_load 009569f0 stores atoi("endstage") at params+0x40; DailyChallenge::Init 00426a50 picks 6/8/10/11 (0xb + megasatan on Sundays) - int _playerType; // challenges_xml_load 009569f0 stores atoi("playertype") at params+0x44; DailyChallenge::Init 00426a50 picks seed % 20 (skipping 11/12/17/20) and maps to tainted 0x15..0x25 - uint8_t _achievementList[0xc]; // std_vector_int; challenges_xml_load 009569f0 pushes "achievements" ids into the vector at params+0x48 (end ptr local +0x4c) - int _soulHearts; // challenges_xml_load 009569f0 stores atoi("soulhp") at params+0x54 - int _blackHearts; // challenges_xml_load 009569f0 stores atoi("blackhp") at params+0x58 - int _hearts; // challenges_xml_load 009569f0 stores atoi("redhp") at params+0x5c - int _maxHearts; // challenges_xml_load 009569f0 stores atoi("maxhp") at params+0x60 - int _coins; // challenges_xml_load 009569f0 stores atoi("coins") at params+0x64 - float _addDamage; // challenges_xml_load 009569f0 stores (float)atof("adddamage") at params+0x68 - bool _canShoot; // challenges_xml_load 009569f0 parses "canshoot" (true/1) into byte params+0x6c; Reset 00424440 = 1 - uint8_t _pad_0x6d[0x3]; - int _difficulty; // challenges_xml_load 009569f0 stores atoi("difficulty") at params+0x70; Game::StartDailyChallenge 006f6dd0 copies daily+0x80 (=+0x10+0x70) to Game _difficulty - bool _isMegaSatan; // challenges_xml_load 009569f0 stores string_to_bool("megasatan") at params+0x74; DailyChallenge::Init 00426a50 sets it with endStage 11 on Sundays - uint8_t _pad_0x75[0x3]; - float _minFireRate; // challenges_xml_load 009569f0 stores (float)atof("minfirerate") at params+0x78 - bool _maxDamage; // challenges_xml_load 009569f0 parses "maxdamage" (true/1) into byte params+0x7c - bool _minShotSpeed; // challenges_xml_load 009569f0 parses "minshotspeed" (true/1) into byte params+0x7d - bool _bigRange; // challenges_xml_load 009569f0 parses "bigrange" (true/1) into byte params+0x7e - bool _isPathTypeSet; // ? challenges_xml_load 009569f0 sets byte params+0x7f = 1 for every parsed ; DailyChallenge::Init 00426a50 sets _params+0x7f = 1; Reset 00424440 clears it (dword +0x7c = 0) - int _pathType; // challenges_xml_load 009569f0: "altpath" true -> params+0x80 = 1, "secretpath" true -> 2; DailyChallenge::Init 00426a50 writes 0..3 with the end stage - uint32_t _getCurse; // challenges_xml_load 009569f0 stores atoi("getcurse") at params+0x84 - uint32_t _curseFilter; // challenges_xml_load 009569f0 stores atoi("cursefilter") at params+0x88 - uint8_t _collectibleTwinList[0xc]; // std_vector_int; challenges_xml_load 009569f0 pushes "startingitems2" ids into the vector at params+0x8c (end ptr local +0x90); copy ctor 0095c050 std::vector copy at +0x8c - uint8_t _seedEffects[0xc]; // std_vector_int; Game::StartDailyChallenge 006f6dd0 calls Seeds::AddSeedEffect(daily+0xa8[i]) (=_params+0x98) for each element (asm 006f6ed2..006f6f12); copy ctor 0095c050 copies the int vector at +0x98; Reset 00424440 sets +0x9c = +0x98; struct size 0xa4 (Game::GetChallengeParams 00706940 stride) -}; -static_assert(offsetof(ChallengeParam, _name) == 0x0); -static_assert(offsetof(ChallengeParam, _roomset) == 0x18); -static_assert(offsetof(ChallengeParam, _collectibleList) == 0x20); -static_assert(offsetof(ChallengeParam, _trinketList) == 0x2c); -static_assert(offsetof(ChallengeParam, _startingPill) == 0x38); -static_assert(offsetof(ChallengeParam, _startingCard) == 0x3c); -static_assert(offsetof(ChallengeParam, _endStage) == 0x40); -static_assert(offsetof(ChallengeParam, _playerType) == 0x44); -static_assert(offsetof(ChallengeParam, _achievementList) == 0x48); -static_assert(offsetof(ChallengeParam, _soulHearts) == 0x54); -static_assert(offsetof(ChallengeParam, _blackHearts) == 0x58); -static_assert(offsetof(ChallengeParam, _hearts) == 0x5c); -static_assert(offsetof(ChallengeParam, _maxHearts) == 0x60); -static_assert(offsetof(ChallengeParam, _coins) == 0x64); -static_assert(offsetof(ChallengeParam, _addDamage) == 0x68); -static_assert(offsetof(ChallengeParam, _canShoot) == 0x6c); -static_assert(offsetof(ChallengeParam, _difficulty) == 0x70); -static_assert(offsetof(ChallengeParam, _isMegaSatan) == 0x74); -static_assert(offsetof(ChallengeParam, _minFireRate) == 0x78); -static_assert(offsetof(ChallengeParam, _maxDamage) == 0x7c); -static_assert(offsetof(ChallengeParam, _minShotSpeed) == 0x7d); -static_assert(offsetof(ChallengeParam, _bigRange) == 0x7e); -static_assert(offsetof(ChallengeParam, _isPathTypeSet) == 0x7f); -static_assert(offsetof(ChallengeParam, _pathType) == 0x80); -static_assert(offsetof(ChallengeParam, _getCurse) == 0x84); -static_assert(offsetof(ChallengeParam, _curseFilter) == 0x88); -static_assert(offsetof(ChallengeParam, _collectibleTwinList) == 0x8c); -static_assert(offsetof(ChallengeParam, _seedEffects) == 0x98); - -struct ColorModState { - float _red; // Game::Render 006fbc10 sends Game+0x676b8 (+0) as the colour-modifier tint red; Game ctor 006f1020 inits 1,1,1,0,0,1 - float _green; // Game::Render 006fbc10 tint green from +4 (Game+0x676bc) - float _blue; // Game::Render 006fbc10 tint blue from +8 (Game+0x676c0) - float _amount; // Game::Render 006fbc10 Shader::set_uniform("Amount", Game+0x676c4); MenuManager::Render 0098a040 set_uniform("Amount", +0xf7cc) (= its _currentColorModState+0xc) - float _brightness; // Game::Render 006fbc10 Shader::set_uniform("Brightness", Game+0x676c8) - float _contrast; // Game::Render 006fbc10 Shader::set_uniform("Contrast", Game+0x676cc); ctor default 1.0 -}; -static_assert(offsetof(ColorModState, _red) == 0x0); -static_assert(offsetof(ColorModState, _green) == 0x4); -static_assert(offsetof(ColorModState, _blue) == 0x8); -static_assert(offsetof(ColorModState, _amount) == 0xc); -static_assert(offsetof(ColorModState, _brightness) == 0x10); -static_assert(offsetof(ColorModState, _contrast) == 0x14); - -struct CoopJoinSlot { - int _controllerIndex; // PlayerManager::GetPlayerSlotFromController 009baaa0 matches it; handle_coop_join 009bac40 passes it to Entity_Player::SetControllerIndex for the joined player; RemoveCoPlayer 009ba000 sets -1; HUD::Render 009a3eb0 draws the join menu while >= 0 - int _playerType; // handle_coop_join 009bac40 sets 0 or the challenge's _playerType and spawns SpawnCoPlayer2(it); -1 picks a random entry of PlayerManager+0x70 - int _state; // ? handle_coop_join 009bac40 sets 1 when a controller joins; RemoveCoPlayer 009ba000 / RestoreGameState set -1; handle_coop_join and HUD::Render 009a3eb0 treat >= 0 as an open join menu - float _menuPosition; // ? handle_coop_join 009bac40 sets 1.0 on join; HUD::Render 009a3eb0 (9a5d3c) draws character portraits from floor(x-2)..ceil(x+2) offset by (i - it), i.e. the scrolling character-select position - bool _isPlayerTypeForced; // handle_coop_join 009bac40 sets 1 when a challenge/daily forces the type (0 otherwise) and only lets the slot browse characters while it is 0, clearing it on confirm - uint8_t _pad_0x11[0x3]; -}; -static_assert(offsetof(CoopJoinSlot, _controllerIndex) == 0x0); -static_assert(offsetof(CoopJoinSlot, _playerType) == 0x4); -static_assert(offsetof(CoopJoinSlot, _state) == 0x8); -static_assert(offsetof(CoopJoinSlot, _menuPosition) == 0xc); -static_assert(offsetof(CoopJoinSlot, _isPlayerTypeForced) == 0x10); - -struct CostumeSpriteDesc { - uint8_t _pad_0x0[0x114]; - uint32_t _item; // ItemConfig_Item* // Entity_Player::UpdateCostumes 0075bf00 reads desc+0x114 as {type,id} (tests type 3 id 0x271 Mega Mush, types 1/3/4 id 0x14); AddCostume compares it with the ItemConfig_Item* arg while walking the 0x130-stride vector - int _priority; // Entity_Player::UpdateCostumes 0075bf00 compares desc+0x118 with PlayerCostumeMap _priority per layer and copies it there when it wins - uint8_t _pad_0x11c[0x10]; - int _playerType; // Entity_Player::UpdateCostumes 0075bf00 rebuilds a mapped desc when *(desc+0x12c) != Entity_Player _playerType -}; -static_assert(offsetof(CostumeSpriteDesc, _item) == 0x114); -static_assert(offsetof(CostumeSpriteDesc, _priority) == 0x118); -static_assert(offsetof(CostumeSpriteDesc, _playerType) == 0x12c); - -struct Cutscene { - uint8_t _pad_0x0[0x808]; - int _currentCutsceneId; // Cutscene::Show 0095e7c0 unloads entry this[0x202] then stores cutsceneid at this+0x808; Manager::update_screen_scale 00954150 / ResizeWindowCallback 009a9ef0 / Manager::Update 00954cd0 index the 0x4c-byte entries at Cutscene+4 by Manager+0x215d8 (=Cutscene+0x808) - uint8_t _pad_0x80c[0x40]; - int _queuedCutsceneId; // Manager::ShowCutscene 00958e60 stores cutsceneID at Manager+0x2161c (=Cutscene+0x84c) and sets pending byte +0x848; Manager::Update 00954cd0 then calls Cutscene::Show(this, it); BossOverlay::update 004212c0 queues 0x19, Game::End 006f9770 queues the endings - bool _isQueuedCleanup; // Manager::ShowCutscene 00958e60 stores shouldCleanup at Manager+0x21620 (=Cutscene+0x850); Manager::Update 00954cd0 clears _isSaveOnExit and calls unload_state before showing when set, and on cutscene end restores the menu state (+0x854) and fade color only when set - uint8_t _pad_0x851[0x3]; -}; -static_assert(offsetof(Cutscene, _currentCutsceneId) == 0x808); -static_assert(offsetof(Cutscene, _queuedCutsceneId) == 0x84c); -static_assert(offsetof(Cutscene, _isQueuedCleanup) == 0x850); - -struct DailyChallenge { - uint32_t _id; // DailyChallenge::Init 00426a50 sets this+0 = dailyDate (yyyymmdd) and seeds the xorshift picks from it; Game::StartDailyChallenge 006f6dd0 copies *daily; Console::Update 0068b260 tests g_game daily _id != 0 - uint32_t _seed; // Game::StartDailyChallenge 006f6dd0 passes daily[1] to Seeds::Seed2String then Seeds::SetStartSeed - bool _isPractice; // Game::StartDailyChallenge 006f6dd0 copies byte daily+8; Menu_DailyChallenge::Update 008cf610 sets Manager daily +8 = (selected option == 2) and only bumps the daily event counter when not practice; Console::Update 0068b260 blocks the console in a non-practice daily - uint8_t _pad_0x9[0x3]; - uint32_t _specialDailyId; // DailyChallenge::Init 00426a50 sets this+0xc = holiday_get_current() and uses ==2 to shift the date seed; Game::StartDailyChallenge 006f6dd0 copies daily[3] - ChallengeParam _params; // DailyChallenge::Init 00426a50 calls ChallengeParam::Reset with ECX = this+0x10 then writes playerType/endStage/pathType at +0x10+0x44/+0x40/+0x80; Game::StartDailyChallenge 006f6dd0 reads difficulty at daily+0x80 (=+0x10+0x70) and seed effects at daily+0xa8 (=+0x10+0x98); struct size 0xb4 -}; -static_assert(offsetof(DailyChallenge, _id) == 0x0); -static_assert(offsetof(DailyChallenge, _seed) == 0x4); -static_assert(offsetof(DailyChallenge, _isPractice) == 0x8); -static_assert(offsetof(DailyChallenge, _specialDailyId) == 0xc); -static_assert(offsetof(DailyChallenge, _params) == 0x10); - -struct DeathmatchManager { - uint8_t _pad_0x0[0xc]; - uint32_t _type; // DeathmatchType* // DeathmatchManager::set_type 00429be0 deletes the old object at this+0xc via vtable slot 0 and news DeathmatchTypeNormal/Ipecac/Bomberman/Ludovico/Sumo/Knockout/SwordFight/MachineGun/Indigestion/KnifeFight into it (Game+0x26620); ~60 sites call its vtable (+0x44 etc.), Game::Render calls +0x14/+0x18 on it -}; -static_assert(offsetof(DeathmatchManager, _type) == 0xc); - -struct RNG { - uint32_t _seed; // RNG::Next 007e90f0 reads/writes the xorshift state at +0 ("RNG Seed is zero!"); RNG::SetSeed 007e8fe0 stores Seed there. Ghidra's RNG is 4 bytes today, so every RNG member shows its shifts as field_0x (Entity+0x3e0..0x3e8, Game+0x182d8.., ItemPool+0x658, Seeds+0xc/0x10, GridEntity+0x30) - uint32_t _shift1; // RNG::Next 007e90f0 seed ^= seed >> this[1]; RNG::SetSeed 007e8fe0 copies 3 shifts from table DAT_00b1f4c8+idx*0xc into +4..+0xc; Game ctor writes 5,9 (qword) at Game+0x182d8 = _generationRNG+4 - uint32_t _shift2; // RNG::Next 007e90f0 seed ^= seed << this[2]; SetSeed 007e8fe0 table dword 2 - uint32_t _shift3; // RNG::Next 007e90f0 seed ^= seed >> this[3]; SetSeed 007e8fe0 table dword 3; Level::Init 00744940 sets Game+0x182f0 (_devilAngelRoomRNG+0xc) = 0x13 -}; -static_assert(offsetof(RNG, _seed) == 0x0); -static_assert(offsetof(RNG, _shift1) == 0x4); -static_assert(offsetof(RNG, _shift2) == 0x8); -static_assert(offsetof(RNG, _shift3) == 0xc); - -struct EntityRef { - int _type; // Lua EntityRef.Type via binder 00875c50: getter 008bb900 pushes dword via FUN_0085bfd0 (signed pushinteger), setter 008bb960 luaL_checkinteger dword - uint32_t _variant; // Lua EntityRef.Variant via binder 00875dd0: getter 008bb9c0 pushes dword via FUN_0085bff0 (pushinteger, high=0 unsigned), setter 008bb960 dword - int _spawnerType; // Lua EntityRef.SpawnerType via binder 00875f40: getter 008bba20 lua_pushinteger(*(int*), sign-extended; separate instance from Type, likely an enum), setter dword - uint32_t _spawnerVariant; // Lua EntityRef.SpawnerVariant via binder 00875dd0: getter 008bb9c0 pushes dword via FUN_0085bff0 (pushinteger, high=0 unsigned), setter 008bb960 dword - Vector _position; // Lua EntityRef.Position via binder 008760c0: getter 008bba80 copies 8 bytes into UserdataValue - Vector _velocity; // EntityRef::constructor 00431310 copies entity _velocity (or g_vectorZero) to +0x18/+0x1c - uint32_t _flags; // EntityRef::constructor 00431310 builds 1 charmed (flag 0x100) | 2 friendly (0x20000000) | 4; Lua EntityRef:IsCharmed 004bc670 returns +0x20 & 1, IsFriendly 004a2910 returns bit 1 - uint32_t _entity; // Entity* // Lua EntityRef.Entity via binder 008763b0: getter 008bbbc0 UserdataPtr with Entity class key c8297a (nil if 0), setter stores pointer -}; -static_assert(offsetof(EntityRef, _type) == 0x0); -static_assert(offsetof(EntityRef, _variant) == 0x4); -static_assert(offsetof(EntityRef, _spawnerType) == 0x8); -static_assert(offsetof(EntityRef, _spawnerVariant) == 0xc); -static_assert(offsetof(EntityRef, _position) == 0x10); -static_assert(offsetof(EntityRef, _velocity) == 0x18); -static_assert(offsetof(EntityRef, _flags) == 0x20); -static_assert(offsetof(EntityRef, _entity) == 0x24); - -struct Entity { - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x4]; -}; -static_assert(offsetof(Entity, _damageEvents) == 0x8); -static_assert(offsetof(Entity, _pendingDamage) == 0x14); -static_assert(offsetof(Entity, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity, _index) == 0x20); -static_assert(offsetof(Entity, _collisionIndex) == 0x24); -static_assert(offsetof(Entity, _type) == 0x28); -static_assert(offsetof(Entity, _variant) == 0x2c); -static_assert(offsetof(Entity, _subtype) == 0x30); -static_assert(offsetof(Entity, _spawnerType) == 0x34); -static_assert(offsetof(Entity, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity, _sprite) == 0x48); -static_assert(offsetof(Entity, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity, _spriteScale) == 0xe4); -static_assert(offsetof(Entity, _isFlipX) == 0x148); -static_assert(offsetof(Entity, _shadowSize) == 0x15c); -static_assert(offsetof(Entity, _shadowOffset) == 0x160); -static_assert(offsetof(Entity, _flags) == 0x168); -static_assert(offsetof(Entity, _valid) == 0x170); -static_assert(offsetof(Entity, _visible) == 0x171); -static_assert(offsetof(Entity, _exists) == 0x172); -static_assert(offsetof(Entity, _dead) == 0x173); -static_assert(offsetof(Entity, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity, _isInterpolating) == 0x175); -static_assert(offsetof(Entity, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity, _removedByFactory) == 0x177); -static_assert(offsetof(Entity, _collisionPoints) == 0x178); -static_assert(offsetof(Entity, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity, _colorParams) == 0x1ac); -static_assert(offsetof(Entity, _color) == 0x1b8); -static_assert(offsetof(Entity, _splatColor) == 0x1e4); -static_assert(offsetof(Entity, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity, _damageCountdown) == 0x214); -static_assert(offsetof(Entity, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity, _fearCountdown) == 0x230); -static_assert(offsetof(Entity, _burnCountdown) == 0x234); -static_assert(offsetof(Entity, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity, _charmSource) == 0x240); -static_assert(offsetof(Entity, _entityRef2) == 0x268); -static_assert(offsetof(Entity, _entityRef3) == 0x290); -static_assert(offsetof(Entity, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity, _iceCountdown) == 0x300); -static_assert(offsetof(Entity, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity, _pausePosition) == 0x314); -static_assert(offsetof(Entity, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity, _spawnFrame) == 0x328); -static_assert(offsetof(Entity, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity, _config) == 0x330); -static_assert(offsetof(Entity, _targetPosition) == 0x334); -static_assert(offsetof(Entity, _pos) == 0x33c); -static_assert(offsetof(Entity, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity, _posOffset) == 0x34c); -static_assert(offsetof(Entity, _renderZOffset) == 0x354); -static_assert(offsetof(Entity, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity, _velocity) == 0x360); -static_assert(offsetof(Entity, _baseFriction) == 0x368); -static_assert(offsetof(Entity, _friction) == 0x36c); -static_assert(offsetof(Entity, _size) == 0x370); -static_assert(offsetof(Entity, _sizeMulti) == 0x374); -static_assert(offsetof(Entity, _mass) == 0x37c); -static_assert(offsetof(Entity, _health) == 0x380); -static_assert(offsetof(Entity, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity, _collisionDamage) == 0x388); -static_assert(offsetof(Entity, _prevPosition) == 0x38c); -static_assert(offsetof(Entity, _prevVelocity) == 0x394); -static_assert(offsetof(Entity, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity, _updateTime) == 0x3a4); -static_assert(offsetof(Entity, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity, _parent) == 0x3bc); -static_assert(offsetof(Entity, _child) == 0x3c0); -static_assert(offsetof(Entity, _target) == 0x3c4); -static_assert(offsetof(Entity, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity, _minecart) == 0x3d4); -static_assert(offsetof(Entity, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity, _initSeed) == 0x3ec); -static_assert(offsetof(Entity, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity, _luaBridgeRef) == 0x408); -static_assert(sizeof(Entity) == 0x410); - -struct EntityConfig { - uint8_t _entities[0x8]; // std_map_uint_EntityConfigEntityEntry; EntityConfig::GetEntity 00694fb0 / GetBestiaryConfig 00695030 lower_bound on map whose head is *this (node key +0x10, value +0x18) - uint8_t _players[0xc]; // vector_EntityConfig_Player; Manager+0x2a678/0x2a67c (= EntityConfig+0x8): Menu_Character::SelectRandomChar, Entity_Player::RestoreGameState, costume_path_apply_skin_color index (end-begin)/0x148 (EntityConfig_Player size); ctor 00950610 zeroes them - uint8_t _babies[0xc]; // vector_EntityConfig_Baby; Entity_Player::InitBabySkin 007bf040 / GetGlitchBabySubType 007c2e90 bound and index Manager+0x2a684/0x2a688 (= EntityConfig+0x14) with stride 0x38; Entity_Familiar::ai_lil_spewer too - uint8_t _bosses[0xc]; // vector_EntityConfig_Boss; load_bossportraits_xml 0069c420 resizes (this+0x20) to 0x68 entries of 100 bytes and pushes alts into elem+0x58 - uint8_t _edenHair[0xc]; // vector_string; EntityConfig::load_players_xml 006998d0: for player id 9 clears vector at +0x2c, reserves 0x80, pushes -}; -static_assert(offsetof(EntityConfig, _entities) == 0x0); -static_assert(offsetof(EntityConfig, _players) == 0x8); -static_assert(offsetof(EntityConfig, _babies) == 0x14); -static_assert(offsetof(EntityConfig, _bosses) == 0x20); -static_assert(offsetof(EntityConfig, _edenHair) == 0x2c); - -struct EntityConfig_Entity { - int id; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it; "id" attr atoi -> +0; GetEntity 00694fb0 key (id<<12|variant)<<8|subtype - int variant; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it; "variant" atoi -> +4 - int subtype; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it; "subtype" atoi -> +8 - uint8_t name[0x18]; // std_string; EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it; "name" attr string::assign into EBP-0x10204 (+0xc) at 006955c0 - float shadowSize; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "shadowSize"/100 -> +0x24; Entity::LoadEntityConfig 006a98b0 copies +0x24 to Entity::_shadowSize - float collisionDamage; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "collisionDamage" atof -> +0x28; Entity::LoadEntityConfig 006a98b0 copies to Entity::_collisionDamage - bool isBoss; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "boss" attr -> byte +0x2c (0/1) - uint8_t _pad_0x2d[0x3]; - int bossID; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "bossID" atoi -> +0x30 - bool canBeChampion; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "champion" -> +0x34 (0/1) - uint8_t _pad_0x35[0x3]; - float collisionRadius; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "collisionRadius" -> +0x38; Entity::LoadEntityConfig 006a98b0 passes +0x38 to SetSize - Vector collisionRadiusMulti; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "collisionRadiusXMulti" -> +0x3c, "collisionRadiusYMulti" -> +0x40; Entity::LoadEntityConfig 006a98b0 passes to SetSize - float mass; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "collisionMass" -> +0x44; Entity::LoadEntityConfig 006a98b0 copies +0x44 to Entity mass - uint32_t gridCollisionPoints; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "numGridCollisionPoints" atoi -> +0x48; Entity::LoadEntityConfig 006a98b0 passes to SetSize - float friction; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "friction" -> +0x4c; Entity::LoadEntityConfig 006a98b0 copies +0x4c to Entity friction - float baseHP; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "baseHP" -> +0x50; Entity::LoadEntityConfig 006a98b0 MaxHitPoints = baseHP + stage*stageHP - float stageHP; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "stageHP" -> +0x54; Entity::LoadEntityConfig 006a98b0 scales it by stage - bool shutDoors; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "shutdoors" -> +0x58 (0/1) - uint8_t _pad_0x59[0x3]; - uint32_t gibsAmount; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "gibAmount" attr and atoi -> +0x5c - uint32_t gibFlags; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it flags -> +0x60 - int portrait; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "portrait" atoi -> +0x64 (negated if negative) - uint8_t _bossColors[0xc]; // std_vector_BossColor; EntityConfig::load_boss_colors 00698e80 clears (end=begin +0x68/+0x6c) and push_backs 0x7c-byte entries (std::vector<124byte>::_Emplace_reallocate, cap +0x70) - uint8_t anm2Path[0x18]; // std_string; EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "anm2path" concat(modpath) -> +0x74; EntityConfig::PreloadResources 0069ba90 AnmCache::Preload(+0x74) - uint8_t _pad_0x8c[0xc]; - uint8_t preloadSounds[0xc]; // std_vector_int; NEW: EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it push_back(atoi) into +0x98..; EntityConfig::PreloadResources 0069ba90 walks +0x98..+0x9c as sound ids - uint8_t devolve[0xc]; // vector_Devolve; EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it push_back of 12-byte {id,var|sub,weight=1.0} into vector end +0xa8 / cap +0xac - bool isPreloaded; // NEW: EntityConfig::PreloadResources 0069ba90 skips when +0xb0 set, sets it to 1 at end - uint8_t _pad_0xb1[0x3]; - uint8_t gridCollisionClassString[0x18]; // std_string; EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "gridCollision" string::assign into +0xb4 (00696030); Entity::LoadEntityConfig 006a98b0 reads size +0xc4 and str_eq "walls"/"ground"/"nopits" - bool reroll; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "reroll" -> +0xcc - bool hasFloorAlts; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "hasFloorAlts" -> +0xcd - uint8_t _pad_0xce[0x2]; - uint32_t collisionInterval; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "collisionInterval" atoi -> +0xd0 - uint8_t _pad_0xd4[0x4]; - uint32_t tags; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "tags" -> EntityConfig::parse_entity_tags 00694680 result -> +0xd8 (+0xdc zeroed alongside) - uint8_t _pad_0xdc[0x4]; - float shieldStrength; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "shieldStrength" atof -> +0xe0 - int shieldFrames; // NEW (not in REPENTOGON): EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "shieldFrames" atoi -> +0xe4 - bool bestiary; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "bestiary" attr -> +0xe8; cleared when bestiary parent set - uint8_t _pad_0xe9[0x3]; - Vector bestiaryOffset; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it atof x3 -> +0xec,+0xf0 (offset) and +0xf4 (scale) - float bestiaryScale; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it third atof -> +0xf4 - uint8_t bestiaryAnm2Path[0x18]; // std_string; EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it concat(modpath) moved into +0xf8 - uint8_t bestiaryAnim[0x18]; // std_string; EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "bestiaryAnim" string::assign into EBP-0x10100 (+0x110) at 00696a10 - uint8_t bestiaryOverlay[0x18]; // std_string; EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it "bestiaryOverlay" string::assign into EBP-0x100e8 (+0x128) at 00696a90 - uint8_t bestiaryFloorAlt[0x18]; // std_string; EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it string::assign into EBP-0x100d0 (+0x140) at 00697e5a - int bestiaryParentType; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it atoi -> +0x158; EntityConfig::GetBestiaryConfig 00695030 follows +0x158/+0x15c - int bestiaryParentVariant; // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it 2nd atoi -> +0x15c; GetBestiaryConfig 00695030 uses it as variant - uint32_t modEntry; // ModEntry* // EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it stores param_2 (ModEntry*, 0 for vanilla) -> +0x160 at 0069843c - bool isPortraitModded; // NEW: EntityConfig::LoadEntities 006950c0 parses entities2.xml into a stack EntityConfig_Entity (id @EBP-0x10210) then inserts it after "portrait": 0 when negative, else ModEntry+0xef9 byte (0 for vanilla) -> +0x164 - uint8_t _pad_0x165[0x3]; -}; -static_assert(offsetof(EntityConfig_Entity, id) == 0x0); -static_assert(offsetof(EntityConfig_Entity, variant) == 0x4); -static_assert(offsetof(EntityConfig_Entity, subtype) == 0x8); -static_assert(offsetof(EntityConfig_Entity, name) == 0xc); -static_assert(offsetof(EntityConfig_Entity, shadowSize) == 0x24); -static_assert(offsetof(EntityConfig_Entity, collisionDamage) == 0x28); -static_assert(offsetof(EntityConfig_Entity, isBoss) == 0x2c); -static_assert(offsetof(EntityConfig_Entity, bossID) == 0x30); -static_assert(offsetof(EntityConfig_Entity, canBeChampion) == 0x34); -static_assert(offsetof(EntityConfig_Entity, collisionRadius) == 0x38); -static_assert(offsetof(EntityConfig_Entity, collisionRadiusMulti) == 0x3c); -static_assert(offsetof(EntityConfig_Entity, mass) == 0x44); -static_assert(offsetof(EntityConfig_Entity, gridCollisionPoints) == 0x48); -static_assert(offsetof(EntityConfig_Entity, friction) == 0x4c); -static_assert(offsetof(EntityConfig_Entity, baseHP) == 0x50); -static_assert(offsetof(EntityConfig_Entity, stageHP) == 0x54); -static_assert(offsetof(EntityConfig_Entity, shutDoors) == 0x58); -static_assert(offsetof(EntityConfig_Entity, gibsAmount) == 0x5c); -static_assert(offsetof(EntityConfig_Entity, gibFlags) == 0x60); -static_assert(offsetof(EntityConfig_Entity, portrait) == 0x64); -static_assert(offsetof(EntityConfig_Entity, _bossColors) == 0x68); -static_assert(offsetof(EntityConfig_Entity, anm2Path) == 0x74); -static_assert(offsetof(EntityConfig_Entity, preloadSounds) == 0x98); -static_assert(offsetof(EntityConfig_Entity, devolve) == 0xa4); -static_assert(offsetof(EntityConfig_Entity, isPreloaded) == 0xb0); -static_assert(offsetof(EntityConfig_Entity, gridCollisionClassString) == 0xb4); -static_assert(offsetof(EntityConfig_Entity, reroll) == 0xcc); -static_assert(offsetof(EntityConfig_Entity, hasFloorAlts) == 0xcd); -static_assert(offsetof(EntityConfig_Entity, collisionInterval) == 0xd0); -static_assert(offsetof(EntityConfig_Entity, tags) == 0xd8); -static_assert(offsetof(EntityConfig_Entity, shieldStrength) == 0xe0); -static_assert(offsetof(EntityConfig_Entity, shieldFrames) == 0xe4); -static_assert(offsetof(EntityConfig_Entity, bestiary) == 0xe8); -static_assert(offsetof(EntityConfig_Entity, bestiaryOffset) == 0xec); -static_assert(offsetof(EntityConfig_Entity, bestiaryScale) == 0xf4); -static_assert(offsetof(EntityConfig_Entity, bestiaryAnm2Path) == 0xf8); -static_assert(offsetof(EntityConfig_Entity, bestiaryAnim) == 0x110); -static_assert(offsetof(EntityConfig_Entity, bestiaryOverlay) == 0x128); -static_assert(offsetof(EntityConfig_Entity, bestiaryFloorAlt) == 0x140); -static_assert(offsetof(EntityConfig_Entity, bestiaryParentType) == 0x158); -static_assert(offsetof(EntityConfig_Entity, bestiaryParentVariant) == 0x15c); -static_assert(offsetof(EntityConfig_Entity, modEntry) == 0x160); -static_assert(offsetof(EntityConfig_Entity, isPortraitModded) == 0x164); - -struct EntityConfig_Player { - int _id; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "id" atoi -> +0; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148); +0x124 defaults to it - uint8_t _name[0x18]; // std_string; EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "name" string::assign into EBP-0x10204 (+4) at 00699c9b; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) string copy +0x4 - uint8_t _skinPath[0x18]; // std_string; EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "skin" concat(root) moved to +0x1c; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) string copy +0x1c - uint8_t _nameImagePath[0x18]; // std_string; EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "nameimage" concat(nameimageroot) -> +0x34; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) string copy +0x34 - uint8_t _portraitPath[0x18]; // std_string; EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "portrait" concat(portraitroot) -> +0x4c; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) string copy +0x4c - uint8_t _unkString[0x18]; // std_string; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) string copy +0x64 (0069b894) and dtor at 0069b7e7; not written by any players.xml attribute - uint8_t _extraPortraitPath[0x18]; // std_string; EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "extraportrait" concat -> +0x7c; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) string copy +0x7c - uint8_t _costumeSuffixName[0x18]; // std_string; EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "costumeSuffix" string::assign into EBP-0x10174 (+0x94) at 0069a7cb; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) copy +0x94 - int _costumeID; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "costume" atoi -> +0xac; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) dword copy - int _heart; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "hp" atoi -> +0xb0 - int _armor; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "armor" atoi -> +0xb4 - int _blackHeart; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "black" atoi -> +0xb8 - int _coins; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "coins" atoi -> +0xbc - int _bombs; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "bombs" atoi -> +0xc0 - int _keys; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "keys" atoi -> +0xc4 - int _card; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "card" atoi -> +0xc8 - int _pill; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "pill" atoi -> +0xcc - bool _canShoot; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "canShoot" true/false -> byte +0xd0; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) byte copy +0xd0 - uint8_t _pad_0xd1[0x3]; - uint8_t _collectibles[0xc]; // std_vector_int; EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "items" list push_back into vector (end +0xd8, cap +0xdc); copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) vector copy +0xd4 - int _trinket; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "trinket" atoi -> +0xe0 - int _skinColor; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "skinColor" atoi -> +0xe4 - int _achievement; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "achievement" atoi -> +0xe8 - int _brokenHeart; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "broken" atoi -> +0xec - uint32_t _pocketActiveID; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "pocketActive" atoi -> +0xf0 - uint8_t _birthrightDescription[0x18]; // std_string; EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "birthright" string::assign into EBP-0x10114 (+0xf4) at 0069a95b; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) copy +0xf4 - uint8_t _bSkinParentName[0x18]; // std_string; EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "bSkinParent" string::assign into EBP-0x100fc (+0x10c) at 0069a9cb; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) copy +0x10c - int _moddedTaintedPlayerID; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) sets +0x124 = own id (vanilla) or players.size() (modded) at 0069abad/0069b325; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) dword copy - bool _hidden; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) "hidden" true/True/atoi -> byte +0x128 (0069ab0c); copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) byte copy - uint8_t _pad_0x129[0x3]; - uint32_t _modEntry; // ModEntry* // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) stores the ModEntry* param at +0x12c (0069ab75); copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) dword copy - bool _renderCustomBackground; // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) set 1 when the modded menu ANM2 has a "Background" layer (bStack_100e8); copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) copies 0x130..0x13f - uint8_t _pad_0x131[0x3]; - uint32_t _moddedMenuBackgroundANM2; // ANM2* // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) allocates ANM2 from ModEntry+0x550 -> +0x134, then GetLayer("Background") - uint32_t _moddedMenuPortraitANM2; // ANM2* // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) allocates ANM2 (ModEntry flag +0x31d) -> +0x138 - uint32_t _moddedGameOverANM2; // ANM2* // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) allocates ANM2 (ModEntry flag +0x431) -> +0x13c - uint32_t _moddedCoopMenuANM2; // ANM2* // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) allocates ANM2 (ModEntry flag +0x545) -> +0x140 - uint32_t _moddedControlsANM2; // ANM2* // EntityConfig::load_players_xml 006998d0 (stack player, id @EBP-0x10208) allocates ANM2 (ModEntry flag +0xbbd) -> +0x144; copy-ctor FUN_0069b810 (push_back of EntityConfig_Player, size 0x148) qword copy 0x140..0x147 ends the 0x148 struct -}; -static_assert(offsetof(EntityConfig_Player, _id) == 0x0); -static_assert(offsetof(EntityConfig_Player, _name) == 0x4); -static_assert(offsetof(EntityConfig_Player, _skinPath) == 0x1c); -static_assert(offsetof(EntityConfig_Player, _nameImagePath) == 0x34); -static_assert(offsetof(EntityConfig_Player, _portraitPath) == 0x4c); -static_assert(offsetof(EntityConfig_Player, _unkString) == 0x64); -static_assert(offsetof(EntityConfig_Player, _extraPortraitPath) == 0x7c); -static_assert(offsetof(EntityConfig_Player, _costumeSuffixName) == 0x94); -static_assert(offsetof(EntityConfig_Player, _costumeID) == 0xac); -static_assert(offsetof(EntityConfig_Player, _heart) == 0xb0); -static_assert(offsetof(EntityConfig_Player, _armor) == 0xb4); -static_assert(offsetof(EntityConfig_Player, _blackHeart) == 0xb8); -static_assert(offsetof(EntityConfig_Player, _coins) == 0xbc); -static_assert(offsetof(EntityConfig_Player, _bombs) == 0xc0); -static_assert(offsetof(EntityConfig_Player, _keys) == 0xc4); -static_assert(offsetof(EntityConfig_Player, _card) == 0xc8); -static_assert(offsetof(EntityConfig_Player, _pill) == 0xcc); -static_assert(offsetof(EntityConfig_Player, _canShoot) == 0xd0); -static_assert(offsetof(EntityConfig_Player, _collectibles) == 0xd4); -static_assert(offsetof(EntityConfig_Player, _trinket) == 0xe0); -static_assert(offsetof(EntityConfig_Player, _skinColor) == 0xe4); -static_assert(offsetof(EntityConfig_Player, _achievement) == 0xe8); -static_assert(offsetof(EntityConfig_Player, _brokenHeart) == 0xec); -static_assert(offsetof(EntityConfig_Player, _pocketActiveID) == 0xf0); -static_assert(offsetof(EntityConfig_Player, _birthrightDescription) == 0xf4); -static_assert(offsetof(EntityConfig_Player, _bSkinParentName) == 0x10c); -static_assert(offsetof(EntityConfig_Player, _moddedTaintedPlayerID) == 0x124); -static_assert(offsetof(EntityConfig_Player, _hidden) == 0x128); -static_assert(offsetof(EntityConfig_Player, _modEntry) == 0x12c); -static_assert(offsetof(EntityConfig_Player, _renderCustomBackground) == 0x130); -static_assert(offsetof(EntityConfig_Player, _moddedMenuBackgroundANM2) == 0x134); -static_assert(offsetof(EntityConfig_Player, _moddedMenuPortraitANM2) == 0x138); -static_assert(offsetof(EntityConfig_Player, _moddedGameOverANM2) == 0x13c); -static_assert(offsetof(EntityConfig_Player, _moddedCoopMenuANM2) == 0x140); -static_assert(offsetof(EntityConfig_Player, _moddedControlsANM2) == 0x144); - -struct EntityDesc { - uint32_t _type; // Entity_Player::update_shooting 0077b020 Friend Ball capture writes type/variant/subtype into _friendBallEnemy +0/+4/+8 - uint32_t _variant; // update_shooting 0077b020 Friend Ball capture (_friendBallEnemy 0x1914) - uint32_t _subtype; // update_shooting 0077b020 Friend Ball capture (_friendBallEnemy 0x1918) - int _championId; // Entity_Player ctor 00753da0 sets _friendBallEnemy+0xc (0x191c) to -1; saved in GameStatePlayer - float _health; // update_shooting 0077b020 Friend Ball capture: maxHealth*0.5 (_friendBallEnemy 0x1920) - float _maxHealth; // update_shooting 0077b020 Friend Ball capture: baseHP (_friendBallEnemy 0x1924) - bool _playerControlled; // Entity_Player ctor 00753da0 zeroes the byte at 0x1928 (_friendBallEnemy+0x18); saved in GameStatePlayer - uint8_t _pad_0x19[0x3]; -}; -static_assert(offsetof(EntityDesc, _type) == 0x0); -static_assert(offsetof(EntityDesc, _variant) == 0x4); -static_assert(offsetof(EntityDesc, _subtype) == 0x8); -static_assert(offsetof(EntityDesc, _championId) == 0xc); -static_assert(offsetof(EntityDesc, _health) == 0x10); -static_assert(offsetof(EntityDesc, _maxHealth) == 0x14); -static_assert(offsetof(EntityDesc, _playerControlled) == 0x18); - -struct EntityList_EL { - uint8_t _pad_0x0[0x4]; - uint32_t _data; // Entity** // Beast/Dogma/Gideon AIs (00444cc0, 004aafa0, 004b1ee0) read *(Room+0x125c)[i] (EL at EntityList+0x40); render_up_to 004199d0 reads EntityList+0x54 [i] (EL at +0x50) - uint32_t _capacity; // EntityList::Reset 00418230 / AddEntity 00418500 log "EL: not enough space for push_back" when size+1 > +0x8 - uint32_t _size; // same loops bound i by Room+0x1264 (EL+0xc of _updateEL) and EntityList+0x5c (EL+0xc of _renderEL) -}; -static_assert(offsetof(EntityList_EL, _data) == 0x4); -static_assert(offsetof(EntityList_EL, _capacity) == 0x8); -static_assert(offsetof(EntityList_EL, _size) == 0xc); - -struct EntityList { - uint8_t _pad_0x0[0x20]; - EntityList_EL _mainEL; // EntityList::Reset 00418230 walks data +0x24 / size +0x2c (cap +0x28), removes entities without FLAG_PERSISTENT (hi flags 0x20) and keeps the rest; EntityList::AddEntity 00418500 pushes non-player entities into it - EntityList_EL _persistentEL; // EntityList::AddEntity 00418500 pushes players (1), familiars (3) and knives 8.0 into data +0x34 / size +0x3c (cap +0x38); Reset 00418230 re-adds them to _updateEL/_renderEL; EntityList::Update 004186c0 drops the ones no longer existing - EntityList_EL _updateEL; // Lua Room:GetEntities 00428a50 returns Room+0x1258 = EntityList(Room+0x1218)+0x40; ENTITY_BEAST_ultra_famine 00444cc0 / ENTITY_DOGMA 004aafa0 / ENTITY_GIDEON 004b1ee0 loop data(+0x44)[i] for i < size(+0x4c), DOGMA copies it as EntityList_EL - EntityList_EL _renderEL; // EntityList::render_up_to 004199d0 walks the depth-sorted render list data +0x54[i] for cursor <= i < size +0x5c; Room::render_water 00820fd0 calls vtable+0x1c on Room+0x126c[i] - uint8_t _pad_0x60[0x30]; - EntityList_EL _wispEL; // EntityList::Reset 00418230 pushes every 3.206 (wisp) of _updateEL into data +0x94 / size +0x9c (cap +0x98) - uint32_t _renderCursor; // EntityList::render_up_to 004199d0 starts at +0xa0, increments it per entity rendered and stops at the first with depth >= arg; Room::render_water 00820fd0 zeroes Room+0x12b8 before each pass and then loops [0, +0x12b8) over the render list - int _renderMode; // EntityList::render_up_to 004199d0 switches on +0xa4 (3/4 water-reflection filters, 5 mirrored pass); same int as Room._renderMode (Room+0x12bc, Lua field) which lies at EntityList+0xa4 -}; -static_assert(offsetof(EntityList, _mainEL) == 0x20); -static_assert(offsetof(EntityList, _persistentEL) == 0x30); -static_assert(offsetof(EntityList, _updateEL) == 0x40); -static_assert(offsetof(EntityList, _renderEL) == 0x50); -static_assert(offsetof(EntityList, _wispEL) == 0x90); -static_assert(offsetof(EntityList, _renderCursor) == 0xa0); -static_assert(offsetof(EntityList, _renderMode) == 0xa4); - -struct Entity_Bomb { // : Entity (flattened) - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x4]; - int _explosionCountdown1; // Lua EntityBomb.SetExplosionCountdown 00452c40 writes this+0x410 (and +0x414) - uint8_t _pad_0x414[0x4]; - float _explosionDamage; // (not in REPENTOGON) Lua EntityBomb.ExplosionDamage getter (folded with Entity_Tear::FallingAcceleration 00435e50) returns this+0x418; Init sets 100.0 - float _fallSpeed; // Entity_Bomb::Update 006a24d0 adds this+0x41c to _posOffset.y, then adds this+0x420 to it; bounce sets it to -0.7*speed - float _fallAcceleration; // Entity_Bomb::Update 006a24d0 adds this+0x420 (default 0.8 when 0) to _fallSpeed each frame - int _bounceCount; // Entity_Bomb::Update 006a24d0 increments it on each floor bounce (fallSpeed *= -0.7) and stops bouncing after 3; Init zeroes - float _rocketAngle; // Entity_Bomb::Update 006a24d0 (rockets) velocity += sin/cos(this+0x428 deg); Angelic Prism (Familiar::Update) sets it via 00456820 on copies - float _rocketSpeed; // Entity_Bomb::Update 006a24d0 this+0x42c += _speedMultiplier and scales rocket thrust; prism copies set it via 0060ce10 - short _collisionCooldown; // Entity_Bomb::HandleCollision 006a5f00: while >0 refreshes to 4 and ignores the collision; Update 006a24d0 decrements, sets 4 when invisible; Init sets 4 - short _parentCollisionCooldown; // Entity_Bomb::HandleCollision 006a5f00: collider == _parent and >0 -> refresh to 4, ignore; Update decrements; Init sets 4 (0x40004 with +0x430) - float _scale; // Entity_Bomb::Update 006a24d0 multiplies SetSize/sprite scale by this+0x434; Init 006a2050 sets 1.0 - BitSet128 _tearFlags; // (not in REPENTOGON) Lua EntityBomb.Flags 005cd560 copies 16 bytes from this+0x438 - bool _isFetus; - uint8_t _pad_0x449[0x3]; - float _radiusMultiplier; // (not in REPENTOGON) Lua EntityBomb.RadiusMultiplier 0060cdc0 returns this+0x44c; Init sets 1.0 - uint8_t _stickyTarget[0x4]; // EntityPtr; Entity_Bomb::HandleCollision 006a5f00 with TEAR_STICKY (bit 37) sets it to the collider (multiset insert) and stores the offset in _targetPosition; Update 006a24d0 follows that entity's pos/velocity - int _bombIndex; // Entity_Bomb::Update 006a24d0 on its first frame gives player bombs a global running number (DAT_00c7ec64++); &1 alternates a side offset - int _updateDelay; // Entity_Bomb::Update 006a24d0 returns early while >0 (decrementing); set 5 for variants 17/20 when Ipecac-style flags are added; Init zeroes - int _scatterTimer; // ? Entity_Bomb::Update 006a24d0 sets 90 when it gives the bomb a random 5-10 velocity, decrements; HandleCollision 006a5f00 checks <1 in room type 0x10 - bool _prismTouched; // Entity_Familiar::Update 0061da10 (Angelic Prism) copies a Dr.Fetus bomb only if bomb+0x460==0 (0060cdd0) and sets it on the copies (0060cde0); REPENTOGON 0x45c is an int countdown here (Update sets 90, decrements) - bool _isSkipNextUpdate; // Entity_Bomb::Update 006a24d0 starts: if set, clear it and return; Init 006a2050 zeroes - bool _hasCostumes; // Entity_Bomb::update_sparks 006a6f10 (costume loader) sets 1 when a costume ANM2 loaded; Update/Render 006a5a60 only update/draw _bombCostumesSprites when set - bool _loadCostumes; // set to 1 by 006a6910 (sets flags at +0x438) and 006a6930 (sets _scale); Entity_Bomb::Update 006a24d0 calls 006a6f10 (loads costume ANM2s at +0x464) when this+0x463 != 0 - ANM2 _bombCostumesSprites[5]; // 006a6f10 (named update_sparks, actually costume load) ANM2::Load into this+0x464...; ctor 006a1e80 eh-vector-constructs ANM2s at +0x464 - uint8_t _hitList[0xc]; // std_vector_uint; Entity_Bomb::HandleCollision 006a5f00 (6a61dd) passes this+0x9c8 to EntityList::HitListContains - uint8_t _pad_0x9d4[0x4]; -}; -static_assert(offsetof(Entity_Bomb, _damageEvents) == 0x8); -static_assert(offsetof(Entity_Bomb, _pendingDamage) == 0x14); -static_assert(offsetof(Entity_Bomb, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity_Bomb, _index) == 0x20); -static_assert(offsetof(Entity_Bomb, _collisionIndex) == 0x24); -static_assert(offsetof(Entity_Bomb, _type) == 0x28); -static_assert(offsetof(Entity_Bomb, _variant) == 0x2c); -static_assert(offsetof(Entity_Bomb, _subtype) == 0x30); -static_assert(offsetof(Entity_Bomb, _spawnerType) == 0x34); -static_assert(offsetof(Entity_Bomb, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity_Bomb, _sprite) == 0x48); -static_assert(offsetof(Entity_Bomb, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity_Bomb, _spriteScale) == 0xe4); -static_assert(offsetof(Entity_Bomb, _isFlipX) == 0x148); -static_assert(offsetof(Entity_Bomb, _shadowSize) == 0x15c); -static_assert(offsetof(Entity_Bomb, _shadowOffset) == 0x160); -static_assert(offsetof(Entity_Bomb, _flags) == 0x168); -static_assert(offsetof(Entity_Bomb, _valid) == 0x170); -static_assert(offsetof(Entity_Bomb, _visible) == 0x171); -static_assert(offsetof(Entity_Bomb, _exists) == 0x172); -static_assert(offsetof(Entity_Bomb, _dead) == 0x173); -static_assert(offsetof(Entity_Bomb, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity_Bomb, _isInterpolating) == 0x175); -static_assert(offsetof(Entity_Bomb, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity_Bomb, _removedByFactory) == 0x177); -static_assert(offsetof(Entity_Bomb, _collisionPoints) == 0x178); -static_assert(offsetof(Entity_Bomb, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity_Bomb, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity_Bomb, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity_Bomb, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity_Bomb, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity_Bomb, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity_Bomb, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity_Bomb, _colorParams) == 0x1ac); -static_assert(offsetof(Entity_Bomb, _color) == 0x1b8); -static_assert(offsetof(Entity_Bomb, _splatColor) == 0x1e4); -static_assert(offsetof(Entity_Bomb, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity_Bomb, _damageCountdown) == 0x214); -static_assert(offsetof(Entity_Bomb, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity_Bomb, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity_Bomb, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity_Bomb, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity_Bomb, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity_Bomb, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity_Bomb, _fearCountdown) == 0x230); -static_assert(offsetof(Entity_Bomb, _burnCountdown) == 0x234); -static_assert(offsetof(Entity_Bomb, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity_Bomb, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity_Bomb, _charmSource) == 0x240); -static_assert(offsetof(Entity_Bomb, _entityRef2) == 0x268); -static_assert(offsetof(Entity_Bomb, _entityRef3) == 0x290); -static_assert(offsetof(Entity_Bomb, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity_Bomb, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity_Bomb, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity_Bomb, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity_Bomb, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity_Bomb, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity_Bomb, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity_Bomb, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity_Bomb, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity_Bomb, _iceCountdown) == 0x300); -static_assert(offsetof(Entity_Bomb, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity_Bomb, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity_Bomb, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity_Bomb, _pausePosition) == 0x314); -static_assert(offsetof(Entity_Bomb, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity_Bomb, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity_Bomb, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity_Bomb, _spawnFrame) == 0x328); -static_assert(offsetof(Entity_Bomb, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity_Bomb, _config) == 0x330); -static_assert(offsetof(Entity_Bomb, _targetPosition) == 0x334); -static_assert(offsetof(Entity_Bomb, _pos) == 0x33c); -static_assert(offsetof(Entity_Bomb, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity_Bomb, _posOffset) == 0x34c); -static_assert(offsetof(Entity_Bomb, _renderZOffset) == 0x354); -static_assert(offsetof(Entity_Bomb, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity_Bomb, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity_Bomb, _velocity) == 0x360); -static_assert(offsetof(Entity_Bomb, _baseFriction) == 0x368); -static_assert(offsetof(Entity_Bomb, _friction) == 0x36c); -static_assert(offsetof(Entity_Bomb, _size) == 0x370); -static_assert(offsetof(Entity_Bomb, _sizeMulti) == 0x374); -static_assert(offsetof(Entity_Bomb, _mass) == 0x37c); -static_assert(offsetof(Entity_Bomb, _health) == 0x380); -static_assert(offsetof(Entity_Bomb, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity_Bomb, _collisionDamage) == 0x388); -static_assert(offsetof(Entity_Bomb, _prevPosition) == 0x38c); -static_assert(offsetof(Entity_Bomb, _prevVelocity) == 0x394); -static_assert(offsetof(Entity_Bomb, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity_Bomb, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity_Bomb, _updateTime) == 0x3a4); -static_assert(offsetof(Entity_Bomb, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity_Bomb, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity_Bomb, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity_Bomb, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity_Bomb, _parent) == 0x3bc); -static_assert(offsetof(Entity_Bomb, _child) == 0x3c0); -static_assert(offsetof(Entity_Bomb, _target) == 0x3c4); -static_assert(offsetof(Entity_Bomb, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity_Bomb, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity_Bomb, _minecart) == 0x3d4); -static_assert(offsetof(Entity_Bomb, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity_Bomb, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity_Bomb, _initSeed) == 0x3ec); -static_assert(offsetof(Entity_Bomb, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity_Bomb, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity_Bomb, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity_Bomb, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity_Bomb, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity_Bomb, _luaBridgeRef) == 0x408); -static_assert(offsetof(Entity_Bomb, _explosionCountdown1) == 0x410); -static_assert(offsetof(Entity_Bomb, _explosionDamage) == 0x418); -static_assert(offsetof(Entity_Bomb, _fallSpeed) == 0x41c); -static_assert(offsetof(Entity_Bomb, _fallAcceleration) == 0x420); -static_assert(offsetof(Entity_Bomb, _bounceCount) == 0x424); -static_assert(offsetof(Entity_Bomb, _rocketAngle) == 0x428); -static_assert(offsetof(Entity_Bomb, _rocketSpeed) == 0x42c); -static_assert(offsetof(Entity_Bomb, _collisionCooldown) == 0x430); -static_assert(offsetof(Entity_Bomb, _parentCollisionCooldown) == 0x432); -static_assert(offsetof(Entity_Bomb, _scale) == 0x434); -static_assert(offsetof(Entity_Bomb, _tearFlags) == 0x438); -static_assert(offsetof(Entity_Bomb, _isFetus) == 0x448); -static_assert(offsetof(Entity_Bomb, _radiusMultiplier) == 0x44c); -static_assert(offsetof(Entity_Bomb, _stickyTarget) == 0x450); -static_assert(offsetof(Entity_Bomb, _bombIndex) == 0x454); -static_assert(offsetof(Entity_Bomb, _updateDelay) == 0x458); -static_assert(offsetof(Entity_Bomb, _scatterTimer) == 0x45c); -static_assert(offsetof(Entity_Bomb, _prismTouched) == 0x460); -static_assert(offsetof(Entity_Bomb, _isSkipNextUpdate) == 0x461); -static_assert(offsetof(Entity_Bomb, _hasCostumes) == 0x462); -static_assert(offsetof(Entity_Bomb, _loadCostumes) == 0x463); -static_assert(offsetof(Entity_Bomb, _bombCostumesSprites) == 0x464); -static_assert(offsetof(Entity_Bomb, _hitList) == 0x9c8); -static_assert(sizeof(Entity_Bomb) == 0x9d8); - -struct Entity_Effect { // : Entity (flattened) - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x4]; - float _height; // Lua EntityEffect.m_Height via binder 00885330: getter 008bee70 pushnumber, setter 008beed0 checknumber -> float - float _fallingSpeed; // Lua EntityEffect.FallingSpeed (folded Entity_Tear::FallingSpeed) returns this+0x414; Entity_Effect::Init 005cdb20 gibs set -5-rand*10 next to m_Height(+0x410)=-23 - float _fallingAcceleration; // Lua EntityEffect.FallingAcceleration (folded Entity_Tear::FallingAcceleration) returns this+0x418; Entity_Effect::Init 005cdb20 gibs set 1.3 - uint8_t _pad_0x41c[0x4]; - BitSet128 _varData; // Entity_Effect::CreateTimer 0060af00 stores the timer callback/delay/times in effect(1000.119)+0x420/+0x424/+0x428 (per-variant scratch data) - uint8_t _pad_0x430[0x20]; - int _state; - float _minRadius; // Lua EntityEffect.MinRadius via binder 00885330: getter 008bee70 pushnumber, setter 008beed0 checknumber -> float - float _maxRadius; // Lua EntityEffect.MaxRadius via binder 00885330: getter 008bee70 pushnumber, setter 008beed0 checknumber -> float - int _timeout; - int _lifespan; - bool _isFollowing; // Lua EntityEffect.IsFollowing via binder 00885610: getter 008bf000 pushboolean(byte), setter toboolean -> bool - uint8_t _pad_0x465[0x3]; - Vector _parentOffset; // Lua EntityEffect.ParentOffset via binder 00885790: getter 008bf0d0 UserdataValue 8-byte copy - int _damageSource; // Lua EntityEffect.DamageSource via binder 008854a0: getter 008bef40 FUN_0085bfd0 signed dword, setter dword - float _rotation; // Lua EntityEffect.Rotation 005784c0 returns float this+0x474; Entity_Effect::Init 005cdb20 zeroes it and sets 30*rand+5 for some variants - float _scale; // Lua EntityEffect.Scale 004d7770 returns float this+0x478; Entity_Effect::Init 005cdb20 defaults it to 1.0 (1.3 for player-spawned 0x20, 0.033 for 0x9b, 0 for 0x79/0xb2); Entity_Effect::Render 00607620 uses scale*0.65 for the overlay layer - uint8_t _pad_0x47c[0x2c]; - uint8_t _hitList[0xc]; // std_vector_uint; (not in REPENTOGON) Entity_Effect::Update passes this+0x4a8 to EntityList::HitListContains 00431640 (5df65f, 5ecd27); ctor 005cd960 zeroes +0x4a8..0x4b0 - uint8_t _pad_0x4b4[0xc]; -}; -static_assert(offsetof(Entity_Effect, _damageEvents) == 0x8); -static_assert(offsetof(Entity_Effect, _pendingDamage) == 0x14); -static_assert(offsetof(Entity_Effect, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity_Effect, _index) == 0x20); -static_assert(offsetof(Entity_Effect, _collisionIndex) == 0x24); -static_assert(offsetof(Entity_Effect, _type) == 0x28); -static_assert(offsetof(Entity_Effect, _variant) == 0x2c); -static_assert(offsetof(Entity_Effect, _subtype) == 0x30); -static_assert(offsetof(Entity_Effect, _spawnerType) == 0x34); -static_assert(offsetof(Entity_Effect, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity_Effect, _sprite) == 0x48); -static_assert(offsetof(Entity_Effect, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity_Effect, _spriteScale) == 0xe4); -static_assert(offsetof(Entity_Effect, _isFlipX) == 0x148); -static_assert(offsetof(Entity_Effect, _shadowSize) == 0x15c); -static_assert(offsetof(Entity_Effect, _shadowOffset) == 0x160); -static_assert(offsetof(Entity_Effect, _flags) == 0x168); -static_assert(offsetof(Entity_Effect, _valid) == 0x170); -static_assert(offsetof(Entity_Effect, _visible) == 0x171); -static_assert(offsetof(Entity_Effect, _exists) == 0x172); -static_assert(offsetof(Entity_Effect, _dead) == 0x173); -static_assert(offsetof(Entity_Effect, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity_Effect, _isInterpolating) == 0x175); -static_assert(offsetof(Entity_Effect, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity_Effect, _removedByFactory) == 0x177); -static_assert(offsetof(Entity_Effect, _collisionPoints) == 0x178); -static_assert(offsetof(Entity_Effect, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity_Effect, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity_Effect, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity_Effect, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity_Effect, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity_Effect, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity_Effect, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity_Effect, _colorParams) == 0x1ac); -static_assert(offsetof(Entity_Effect, _color) == 0x1b8); -static_assert(offsetof(Entity_Effect, _splatColor) == 0x1e4); -static_assert(offsetof(Entity_Effect, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity_Effect, _damageCountdown) == 0x214); -static_assert(offsetof(Entity_Effect, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity_Effect, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity_Effect, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity_Effect, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity_Effect, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity_Effect, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity_Effect, _fearCountdown) == 0x230); -static_assert(offsetof(Entity_Effect, _burnCountdown) == 0x234); -static_assert(offsetof(Entity_Effect, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity_Effect, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity_Effect, _charmSource) == 0x240); -static_assert(offsetof(Entity_Effect, _entityRef2) == 0x268); -static_assert(offsetof(Entity_Effect, _entityRef3) == 0x290); -static_assert(offsetof(Entity_Effect, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity_Effect, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity_Effect, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity_Effect, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity_Effect, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity_Effect, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity_Effect, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity_Effect, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity_Effect, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity_Effect, _iceCountdown) == 0x300); -static_assert(offsetof(Entity_Effect, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity_Effect, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity_Effect, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity_Effect, _pausePosition) == 0x314); -static_assert(offsetof(Entity_Effect, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity_Effect, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity_Effect, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity_Effect, _spawnFrame) == 0x328); -static_assert(offsetof(Entity_Effect, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity_Effect, _config) == 0x330); -static_assert(offsetof(Entity_Effect, _targetPosition) == 0x334); -static_assert(offsetof(Entity_Effect, _pos) == 0x33c); -static_assert(offsetof(Entity_Effect, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity_Effect, _posOffset) == 0x34c); -static_assert(offsetof(Entity_Effect, _renderZOffset) == 0x354); -static_assert(offsetof(Entity_Effect, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity_Effect, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity_Effect, _velocity) == 0x360); -static_assert(offsetof(Entity_Effect, _baseFriction) == 0x368); -static_assert(offsetof(Entity_Effect, _friction) == 0x36c); -static_assert(offsetof(Entity_Effect, _size) == 0x370); -static_assert(offsetof(Entity_Effect, _sizeMulti) == 0x374); -static_assert(offsetof(Entity_Effect, _mass) == 0x37c); -static_assert(offsetof(Entity_Effect, _health) == 0x380); -static_assert(offsetof(Entity_Effect, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity_Effect, _collisionDamage) == 0x388); -static_assert(offsetof(Entity_Effect, _prevPosition) == 0x38c); -static_assert(offsetof(Entity_Effect, _prevVelocity) == 0x394); -static_assert(offsetof(Entity_Effect, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity_Effect, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity_Effect, _updateTime) == 0x3a4); -static_assert(offsetof(Entity_Effect, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity_Effect, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity_Effect, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity_Effect, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity_Effect, _parent) == 0x3bc); -static_assert(offsetof(Entity_Effect, _child) == 0x3c0); -static_assert(offsetof(Entity_Effect, _target) == 0x3c4); -static_assert(offsetof(Entity_Effect, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity_Effect, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity_Effect, _minecart) == 0x3d4); -static_assert(offsetof(Entity_Effect, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity_Effect, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity_Effect, _initSeed) == 0x3ec); -static_assert(offsetof(Entity_Effect, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity_Effect, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity_Effect, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity_Effect, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity_Effect, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity_Effect, _luaBridgeRef) == 0x408); -static_assert(offsetof(Entity_Effect, _height) == 0x410); -static_assert(offsetof(Entity_Effect, _fallingSpeed) == 0x414); -static_assert(offsetof(Entity_Effect, _fallingAcceleration) == 0x418); -static_assert(offsetof(Entity_Effect, _varData) == 0x420); -static_assert(offsetof(Entity_Effect, _state) == 0x450); -static_assert(offsetof(Entity_Effect, _minRadius) == 0x454); -static_assert(offsetof(Entity_Effect, _maxRadius) == 0x458); -static_assert(offsetof(Entity_Effect, _timeout) == 0x45c); -static_assert(offsetof(Entity_Effect, _lifespan) == 0x460); -static_assert(offsetof(Entity_Effect, _isFollowing) == 0x464); -static_assert(offsetof(Entity_Effect, _parentOffset) == 0x468); -static_assert(offsetof(Entity_Effect, _damageSource) == 0x470); -static_assert(offsetof(Entity_Effect, _rotation) == 0x474); -static_assert(offsetof(Entity_Effect, _scale) == 0x478); -static_assert(offsetof(Entity_Effect, _hitList) == 0x4a8); -static_assert(sizeof(Entity_Effect) == 0x4c0); - -struct NPCAI_Pathfinder { - uint32_t _entity; // Entity* // PathFinder::Init 007e31a0 stores the owner (called from the NPC/Familiar constructors with this); UpdateGridIndex 007e6ff0 reads owner+0x33c position - Vector _movementTarget; // PathFinder::MoveRandomly 007e6300 picks a random destination into +4/+8 and steers toward it; Lua ResetMovementTarget 007e6fa0 and Reset 007e3260 zero it (NPC +0x418) - Vector _moveDirection; // ? PathFinder::MoveRandomlyBoss accumulates and normalises a direction in +0xc/+0x10 and negates it on grid collision; ResetMovementTarget 007e6fa0 zeroes it (NPC +0x420) - int _direction; // PathFinder::Reset 007e3260 sets -1; SimulatePlayerMovement 007e8010 derives it from the movement input as a Direction (0 left, 1 up, 2 right, 3 down, -1 none) - uint8_t _pad_0x18[0x8]; - int _gridIndex; // Lua PathFinder.UpdateGridIndex 007e6ff0 writes the owner's grid index (or -1) to +0x20, GetGridIndex returns it; Reset sets -1 (NPC +0x434) - uint8_t _pad_0x24[0x4]; - int _moveCountdown; // PathFinder::Reset 007e3260 zeroes it; update_chase_movement 007e6b90 counts it down by elapsed ticks and picks a new random angle at <1 (reload 45..164, 10 while feared/confused); SimulatePlayerMovement 007e8010 reloads 60 under entity flag 0x8000000, else decrements to 0 and scales drift by it/60 - uint8_t _pad_0x2c[0x700]; - bool _hasDirectPath; // Lua PathFinder.HasDirectPath returns byte +0x72c; Reset 007e3260 clears it (NPC +0xb40, tested by Gaper-family AIs); same struct as lua_fields 'PathFinder' - uint8_t _pad_0x72d[0x3]; - Vector _gridPathTarget; // PathFinder::FindGridPath stores the target position in +0x730/+0x734 (in_ECX[0x1cc/0x1cd]) and reuses it; Reset zeroes it (NPC +0xb44) - bool _canCrushRocks; // Lua PathFinder.SetCanCrushRocks 00499dc0 writes byte +0x738; FindGridPath tests it; Reset clears it (NPC +0xb4c) - uint8_t _pad_0x739[0x3]; - int _evadeMovementCountdown; // Lua PathFinder.GetEvadeMovementCountdown 00456740 returns +0x73c; EvadeTarget sets 3 / subtracts elapsed ticks (NPC +0xb50); same as lua_fields 'PathFinder' - uint8_t _pad_0x740[0x4]; - float _evadeDistance; // ? PathFinder::EvadeTarget clamps +0x744 to <=20 and decays it *0.9, picking random moves while >20; Reset zeroes it (NPC +0xb58, Heart AI tests <=20) -}; -static_assert(offsetof(NPCAI_Pathfinder, _entity) == 0x0); -static_assert(offsetof(NPCAI_Pathfinder, _movementTarget) == 0x4); -static_assert(offsetof(NPCAI_Pathfinder, _moveDirection) == 0xc); -static_assert(offsetof(NPCAI_Pathfinder, _direction) == 0x14); -static_assert(offsetof(NPCAI_Pathfinder, _gridIndex) == 0x20); -static_assert(offsetof(NPCAI_Pathfinder, _moveCountdown) == 0x28); -static_assert(offsetof(NPCAI_Pathfinder, _hasDirectPath) == 0x72c); -static_assert(offsetof(NPCAI_Pathfinder, _gridPathTarget) == 0x730); -static_assert(offsetof(NPCAI_Pathfinder, _canCrushRocks) == 0x738); -static_assert(offsetof(NPCAI_Pathfinder, _evadeMovementCountdown) == 0x73c); -static_assert(offsetof(NPCAI_Pathfinder, _evadeDistance) == 0x744); - -struct Entity_Familiar { // : Entity (flattened) - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x4]; - uint32_t _player; // Entity_Player* - uint32_t _sirenOriginalPlayer; // Entity_Player* // Siren charm 0064b920 saves the old _player (+0x410) here before handing the familiar over; Entity_Familiar::RemoveFromPlayer 0064bab0 restores the owner from it and clears it; Init zeroes it, delirium_morph 00631b20 carries it over - uint8_t _pad_0x418[0x1e0]; - int _moveDelayNum; // Lua EntityFamiliar:MoveDelayed 00631050 uses +0x5f8 as the ring index into the Vector history at 0x418 ((idx+1)%delay), resetting it to 0 when refilling - NPCAI_Pathfinder _pathfinder; // Entity_Familiar::predict_player_movement 00650220 calls NPCAI_Pathfinder::SimulatePlayerMovement(this+0x5fc); FamiliarAI::bumbo 0062f7f0 calls NPCAI_Pathfinder::HasPathToPos on it - uint8_t _pad_0xd44[0x8]; - int _fireCooldown; // Lua EntityFamiliar.FireCooldown via binder 00885f80: getter 008bf210 FUN_0085bfd0 signed dword, setter dword - int _headFrameDelay; // Lua EntityFamiliar.HeadFrameDelay via binder 00885f80: getter 008bf210 FUN_0085bfd0 signed dword, setter dword - int _moveDirection; // Lua EntityFamiliar.MoveDirection via binder 00885f80: getter 008bf210 FUN_0085bfd0 signed dword, setter dword - int _shootDirection; // Lua EntityFamiliar.ShootDirection via binder 00885f80: getter 008bf210 FUN_0085bfd0 signed dword, setter dword - int _lastDirection; // Lua EntityFamiliar.LastDirection via binder 00885f80: getter 008bf210 FUN_0085bfd0 signed dword, setter dword - float _orbitAngleOffset; // Lua EntityFamiliar.OrbitAngleOffset via binder 008860f0: getter 008bf2d0 pushnumber, setter checknumber -> float - Vector _orbitDistance; // Lua EntityFamiliar.OrbitDistance via binder 00886260: getter 008bf3a0 UserdataValue 8-byte copy - float _orbitSpeed; // Lua EntityFamiliar.OrbitSpeed via binder 008860f0: getter 008bf2d0 pushnumber, setter checknumber -> float - int _orbitLayer; // Lua EntityFamiliar.OrbitLayer via binder 00885f80: getter 008bf210 FUN_0085bfd0 signed dword, setter dword - bool _isFollower; - bool _isDelayed; - bool _isNotCountedAsFollower; // ? Entity_Familiar::FollowParent 00612bb0 counts only followers with priority>0 and +0xd76==0; set by Init 0060de70 (subtype 55555 and some variants) and WispInit 00436330 for intangible wisps; Init clears it - bool _isSubtype55555; // ? Entity_Familiar::Init 0060de70 sets it = (subtype == 55555) and then gives the familiar ItemConfig collectible 661, a color and no appear flag; AddToFollowers 0062db20 / AddToDelayed 00613fe0 return early and Kill 00610540 skips the orbit-layer logic when set - bool _isHourglassRewound; // Entity_Familiar::TriggerGlowingHourglass 00651890 sets +0xd78=1; Entity_Familiar::room_enter 0062bb70 Remove()s (vtable+0x28) a _isNotCountedAsFollower familiar on room enter only while it is 0, then clears it; Init 0060de70 zeroes it - uint8_t _pad_0xd79[0x3]; - int _coins; - int _hearts; - int _keys; - int _state; - int _roomClearCount; // Lua EntityFamiliar.RoomClearCount via binder 00885f80: getter 008bf210 FUN_0085bfd0 signed dword, setter dword - Vector _formationOffset; // Entity_Familiar::UpdateFollowPosition 00634260 lerps +0xd90 toward +0xd98 by 0.1 each frame and returns it rotated by +0xda0 (Duct Tape formation offset from the player); FollowParent 00612bb0 / MoveDelayed 00631050 / GetOrbitPosition 006139b0 pin _pos to it for subtype-55555 familiars; reset_follow_target 006348d0 zeroes it; ai_wisp 0043aa90 pins _pos to it when nonzero - Vector _formationTargetOffset; // Entity_Familiar::UpdateFollowPosition 00634260 rebuilds it when player _ductTapeMode (+0x1ef0) differs from +0xda4: mode 1 row (+-32*(n/2+1),0), mode 2 V (24px steps, y 32-|x|), mode 3 circle radius 54, else pos - player pos; reset_follow_target 006348d0 zeroes it; Init 0060de70 sets it with +0xd90 - float _formationAngle; // Entity_Familiar::UpdateFollowPosition 00634260 lerps it (0.1, shortest angle, normalized to +-180) toward the player's aim direction (player+0x1630 atan2 - 90) and rotates _formationOffset by it; reset_follow_target 006348d0 / Init 0060de70 zero it - uint8_t _formationMode; // Entity_Familiar::UpdateFollowPosition 00634260 caches player _ductTapeMode (+0x1ef0) here and recomputes _formationTargetOffset when they differ; 0 skips the rotation; reset_follow_target 006348d0 / Init 0060de70 set 0xff - uint8_t _pad_0xda5[0x3]; - int _counter; // multi-purpose per-variant counter: Update 0061da10 counts it down / up to 749, HandleCollision 006261f0 sets 300 (variant 58), TriggerRoomClear 0062aab0 increments it, update_weapon 0062e620 uses it as a fire delay, TakeDamage 0062cdc0 ignores damage while >0 for variant 238; Init zeroes it - uint8_t _hitList[0xc]; // std_vector_uint; (not in REPENTOGON) Entity_Familiar::HandleCollision 006261f0, ai_umbilical_baby, ai_pickup_sack, apollyons_best_friend pass this+0xdac to EntityList::HitListContains - int _appearTimer; // Entity_Familiar::Init 0060de70 sets 5; Update 0061da10 counts it down while entity flag 4 (appear) is set, spawns the poof at 3, keeps the familiar invisible until 0 and skips its AI - int _chargeLevel; // ? Entity_Familiar::Update 0061da10 variant 226 only: counts 0..5 up while an entity flag is set and down otherwise, sound volume min(level*0.2,1) and pitch from it, stops the loop sound at 0 - uint8_t _linkedEntity[0x4]; // EntityPtr; Entity_Familiar::Shoot 00614b10 stores the blue fly from AddBlueFlies, FireBrimstone 00638c10 the laser, Init 0060de70 the effect 1000.201 of variant 240; ClearReferences 006121d0 Remove()s it for variant 240 and resets it - uint32_t _weapon; // Weapon* // Entity_Familiar::update_weapon 0062e620 stores Isaac::CreateWeapon() in this+0xdc4 / destroys it; delirium_morph 00631b20 frees it - bool _isLilDelirium; // Entity_Familiar::delirium_morph 00631b20 sets this+0xdc8=1; Entity_Familiar::Update 0061da10 tests it each frame - uint8_t _pad_0xdc9[0x3]; - ANM2 _chargeBarSprite; // (not in REPENTOGON) Entity_Familiar::Init 0060de70 loads gfx/chargebar.anm2 into this+0xdcc; ctor 0060d200 constructs an ANM2 there - uint32_t _extraData; // void* // ReferenceCount pointer: set_extra_data 004357e0 allocates it (in_ECX[1]); Render 00624e10 RTDynamicCasts +0xee0 to IsaacsBodyData for variant 48; ctor zeroes +0xee0/+0xee4 - uint8_t _pad_0xee4[0x4]; - uint32_t _item; // ItemConfig_Item* // Isaac::SpawnLocust 005b35c0 stores the ItemConfig collectible entry at this+0xee8 (Init 0060de70 does too for subtype 55555) - uint8_t _sirenHelper[0x4]; // EntityPtr; Siren charm 0064b920 spawns entity 966 (Siren helper, parent=Siren, target=familiar) into +0xeec; RemoveFromPlayer 0064bab0 Remove()s it; HandleCollision 006261f0 / convert_shot_for_enemy_owner 0064bb70 check its age; Init erases it - int _sirenCharmFrames; // Siren charm 0064b920 sets +0xef0=1, Entity_Familiar::Update 0061da10 increments it each frame while >0, RemoveFromPlayer 0064bab0 clears it - ColorMod _dirtColor; // Entity_Familiar::UpdateDirtColor 0064ca30 writes Room::GetFloorColorAt*2 to this+0xef4..0xefc (+0xf00=1.0) and lerps layers toward it - int _wispCollectibleType; // Entity_Familiar::WispInit 00436330 stores the source collectible (712 Lemegeton, or the original 515/490 before rerolling the subtype) in this+0xf20 - uint8_t _pad_0xf24[0x24]; -}; -static_assert(offsetof(Entity_Familiar, _damageEvents) == 0x8); -static_assert(offsetof(Entity_Familiar, _pendingDamage) == 0x14); -static_assert(offsetof(Entity_Familiar, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity_Familiar, _index) == 0x20); -static_assert(offsetof(Entity_Familiar, _collisionIndex) == 0x24); -static_assert(offsetof(Entity_Familiar, _type) == 0x28); -static_assert(offsetof(Entity_Familiar, _variant) == 0x2c); -static_assert(offsetof(Entity_Familiar, _subtype) == 0x30); -static_assert(offsetof(Entity_Familiar, _spawnerType) == 0x34); -static_assert(offsetof(Entity_Familiar, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity_Familiar, _sprite) == 0x48); -static_assert(offsetof(Entity_Familiar, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity_Familiar, _spriteScale) == 0xe4); -static_assert(offsetof(Entity_Familiar, _isFlipX) == 0x148); -static_assert(offsetof(Entity_Familiar, _shadowSize) == 0x15c); -static_assert(offsetof(Entity_Familiar, _shadowOffset) == 0x160); -static_assert(offsetof(Entity_Familiar, _flags) == 0x168); -static_assert(offsetof(Entity_Familiar, _valid) == 0x170); -static_assert(offsetof(Entity_Familiar, _visible) == 0x171); -static_assert(offsetof(Entity_Familiar, _exists) == 0x172); -static_assert(offsetof(Entity_Familiar, _dead) == 0x173); -static_assert(offsetof(Entity_Familiar, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity_Familiar, _isInterpolating) == 0x175); -static_assert(offsetof(Entity_Familiar, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity_Familiar, _removedByFactory) == 0x177); -static_assert(offsetof(Entity_Familiar, _collisionPoints) == 0x178); -static_assert(offsetof(Entity_Familiar, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity_Familiar, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity_Familiar, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity_Familiar, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity_Familiar, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity_Familiar, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity_Familiar, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity_Familiar, _colorParams) == 0x1ac); -static_assert(offsetof(Entity_Familiar, _color) == 0x1b8); -static_assert(offsetof(Entity_Familiar, _splatColor) == 0x1e4); -static_assert(offsetof(Entity_Familiar, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity_Familiar, _damageCountdown) == 0x214); -static_assert(offsetof(Entity_Familiar, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity_Familiar, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity_Familiar, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity_Familiar, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity_Familiar, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity_Familiar, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity_Familiar, _fearCountdown) == 0x230); -static_assert(offsetof(Entity_Familiar, _burnCountdown) == 0x234); -static_assert(offsetof(Entity_Familiar, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity_Familiar, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity_Familiar, _charmSource) == 0x240); -static_assert(offsetof(Entity_Familiar, _entityRef2) == 0x268); -static_assert(offsetof(Entity_Familiar, _entityRef3) == 0x290); -static_assert(offsetof(Entity_Familiar, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity_Familiar, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity_Familiar, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity_Familiar, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity_Familiar, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity_Familiar, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity_Familiar, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity_Familiar, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity_Familiar, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity_Familiar, _iceCountdown) == 0x300); -static_assert(offsetof(Entity_Familiar, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity_Familiar, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity_Familiar, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity_Familiar, _pausePosition) == 0x314); -static_assert(offsetof(Entity_Familiar, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity_Familiar, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity_Familiar, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity_Familiar, _spawnFrame) == 0x328); -static_assert(offsetof(Entity_Familiar, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity_Familiar, _config) == 0x330); -static_assert(offsetof(Entity_Familiar, _targetPosition) == 0x334); -static_assert(offsetof(Entity_Familiar, _pos) == 0x33c); -static_assert(offsetof(Entity_Familiar, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity_Familiar, _posOffset) == 0x34c); -static_assert(offsetof(Entity_Familiar, _renderZOffset) == 0x354); -static_assert(offsetof(Entity_Familiar, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity_Familiar, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity_Familiar, _velocity) == 0x360); -static_assert(offsetof(Entity_Familiar, _baseFriction) == 0x368); -static_assert(offsetof(Entity_Familiar, _friction) == 0x36c); -static_assert(offsetof(Entity_Familiar, _size) == 0x370); -static_assert(offsetof(Entity_Familiar, _sizeMulti) == 0x374); -static_assert(offsetof(Entity_Familiar, _mass) == 0x37c); -static_assert(offsetof(Entity_Familiar, _health) == 0x380); -static_assert(offsetof(Entity_Familiar, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity_Familiar, _collisionDamage) == 0x388); -static_assert(offsetof(Entity_Familiar, _prevPosition) == 0x38c); -static_assert(offsetof(Entity_Familiar, _prevVelocity) == 0x394); -static_assert(offsetof(Entity_Familiar, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity_Familiar, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity_Familiar, _updateTime) == 0x3a4); -static_assert(offsetof(Entity_Familiar, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity_Familiar, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity_Familiar, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity_Familiar, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity_Familiar, _parent) == 0x3bc); -static_assert(offsetof(Entity_Familiar, _child) == 0x3c0); -static_assert(offsetof(Entity_Familiar, _target) == 0x3c4); -static_assert(offsetof(Entity_Familiar, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity_Familiar, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity_Familiar, _minecart) == 0x3d4); -static_assert(offsetof(Entity_Familiar, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity_Familiar, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity_Familiar, _initSeed) == 0x3ec); -static_assert(offsetof(Entity_Familiar, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity_Familiar, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity_Familiar, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity_Familiar, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity_Familiar, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity_Familiar, _luaBridgeRef) == 0x408); -static_assert(offsetof(Entity_Familiar, _player) == 0x410); -static_assert(offsetof(Entity_Familiar, _sirenOriginalPlayer) == 0x414); -static_assert(offsetof(Entity_Familiar, _moveDelayNum) == 0x5f8); -static_assert(offsetof(Entity_Familiar, _pathfinder) == 0x5fc); -static_assert(offsetof(Entity_Familiar, _fireCooldown) == 0xd4c); -static_assert(offsetof(Entity_Familiar, _headFrameDelay) == 0xd50); -static_assert(offsetof(Entity_Familiar, _moveDirection) == 0xd54); -static_assert(offsetof(Entity_Familiar, _shootDirection) == 0xd58); -static_assert(offsetof(Entity_Familiar, _lastDirection) == 0xd5c); -static_assert(offsetof(Entity_Familiar, _orbitAngleOffset) == 0xd60); -static_assert(offsetof(Entity_Familiar, _orbitDistance) == 0xd64); -static_assert(offsetof(Entity_Familiar, _orbitSpeed) == 0xd6c); -static_assert(offsetof(Entity_Familiar, _orbitLayer) == 0xd70); -static_assert(offsetof(Entity_Familiar, _isFollower) == 0xd74); -static_assert(offsetof(Entity_Familiar, _isDelayed) == 0xd75); -static_assert(offsetof(Entity_Familiar, _isNotCountedAsFollower) == 0xd76); -static_assert(offsetof(Entity_Familiar, _isSubtype55555) == 0xd77); -static_assert(offsetof(Entity_Familiar, _isHourglassRewound) == 0xd78); -static_assert(offsetof(Entity_Familiar, _coins) == 0xd7c); -static_assert(offsetof(Entity_Familiar, _hearts) == 0xd80); -static_assert(offsetof(Entity_Familiar, _keys) == 0xd84); -static_assert(offsetof(Entity_Familiar, _state) == 0xd88); -static_assert(offsetof(Entity_Familiar, _roomClearCount) == 0xd8c); -static_assert(offsetof(Entity_Familiar, _formationOffset) == 0xd90); -static_assert(offsetof(Entity_Familiar, _formationTargetOffset) == 0xd98); -static_assert(offsetof(Entity_Familiar, _formationAngle) == 0xda0); -static_assert(offsetof(Entity_Familiar, _formationMode) == 0xda4); -static_assert(offsetof(Entity_Familiar, _counter) == 0xda8); -static_assert(offsetof(Entity_Familiar, _hitList) == 0xdac); -static_assert(offsetof(Entity_Familiar, _appearTimer) == 0xdb8); -static_assert(offsetof(Entity_Familiar, _chargeLevel) == 0xdbc); -static_assert(offsetof(Entity_Familiar, _linkedEntity) == 0xdc0); -static_assert(offsetof(Entity_Familiar, _weapon) == 0xdc4); -static_assert(offsetof(Entity_Familiar, _isLilDelirium) == 0xdc8); -static_assert(offsetof(Entity_Familiar, _chargeBarSprite) == 0xdcc); -static_assert(offsetof(Entity_Familiar, _extraData) == 0xee0); -static_assert(offsetof(Entity_Familiar, _item) == 0xee8); -static_assert(offsetof(Entity_Familiar, _sirenHelper) == 0xeec); -static_assert(offsetof(Entity_Familiar, _sirenCharmFrames) == 0xef0); -static_assert(offsetof(Entity_Familiar, _dirtColor) == 0xef4); -static_assert(offsetof(Entity_Familiar, _wispCollectibleType) == 0xf20); -static_assert(sizeof(Entity_Familiar) == 0xf48); - -struct HomingLaser { - uint8_t _pad_0x0[0x1c]; - uint8_t _samples[0xc]; // vector_Vector; Entity_Laser::get_segment_start_dir 0096d160 and update_line_hits 00971810 walk _homingLaser+0x1c..+0x20 as Vector points (>>3); Entity_Laser::Init 0096f590 / ClearLaserSamples 0096f4e0 / Knife::InitHomingPath 00961320 set end=begin; ctor 0099c290 zeroes it - uint8_t _nonOptimizedSamples[0xc]; // vector_Vector; ? Entity_Laser::find_nearest_grid_hit 00970cb0 walks _homingLaser+0x28..+0x2c as Vectors (>>3); Init/ClearLaserSamples/InitHomingPath reset end=begin with +0x1c and +0x34 (name from REPENTOGON) - uint8_t _pad_0x34[0x10]; - float _totalLength; // HomingLaser::CalculateSamples 0099e360 zeroes +0x44, adds each bezier segment length to it, then divides the cumulative per-segment lengths by it (skipped when 0) and uses it/200 for the sample spacing - uint8_t _bezier[0xc]; // vector_HomingLaserBezier; HomingLaser::CalculateSamples 0099e360 counts (+0x4c - +0x48)/0x18 bezier segments (returns if <2) and walks them; ctor 0099c290 zeroes +0x48..+0x50, dtor FUN_0099c310 Tidy(+0x48); seen as Entity_Laser 0x4ac/0x4b0 (HL at 0x464: ClearLaserSamples 0096f4e0 / Init 0096f590 set end=begin) and Entity_Knife 0x4b0/0x4b4 (HL at 0x468: Knife::Update 00961b00 runs bezier_closest_point over the 0x18-byte segments, Free 00960b50 Tidy) -}; -static_assert(offsetof(HomingLaser, _samples) == 0x1c); -static_assert(offsetof(HomingLaser, _nonOptimizedSamples) == 0x28); -static_assert(offsetof(HomingLaser, _totalLength) == 0x44); -static_assert(offsetof(HomingLaser, _bezier) == 0x48); - -struct Entity_Knife { // : Entity (flattened) - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x4]; - BitSet128 _tearFlags; // Lua EntityKnife.TearFlags getter 0085de90 copies 16 bytes from this+0x410 - BitSet128 _usedTearFlags; // Entity_Knife::apply_hit_effects 0096ae70 tests _tearFlags & ~(+0x420) & group and ORs the group (c34850, c34bc0) into 0x420..0x42c after triggering its one-shot effect; UpdateHomingPath 00967180 (from Shoot/Update) clears it; ctor 00960a70 zeroes it - float _scale; // Lua EntityKnife.Scale via binder 00889f70: getter 008c04f0 pushnumber, setter checknumber -> float - float _knifeDepthOffset; // Entity_Knife::GetRenderZ 009665e0 returns floor((+0x434 + pos.y)*100 + 10030); Update writes it from the swing direction, Shoot 00966ef0 zeroes it - float _rotation; // Lua EntityKnife.Rotation getter 004d7790 returns this+0x438; Update 00961b00 sets sprite rotation = +0x438 - 90 - float _rotationOffset; // Lua EntityKnife.RotationOffset via binder 00889f70: getter 008c04f0 pushnumber, setter checknumber -> float - float _displayRotation; // Entity_Knife::Update 00961b00 LerpAngleDeg's it toward _rotation+_rotationOffset (+0x438 + +0x43c) and places the knife at parent pos + sin/cos(+0x440); SetAttackAnimation 009680d0 / SpinAttack 00968430 snap it to +0x438 - float _knifeDistance; // Lua EntityKnife.GetKnifeDistance 0085deb0 returns this+0x444 - float _knifeVelocity; // Lua EntityKnife.GetKnifeVelocity 004d77a0 returns this+0x448 - Vector _anchorPosition; // Entity_Knife::Update 00961b00 lerps it toward the parent pos by 1 - charge*dist*0.8 (set to parent pos when zero); SetAttackAnimation 009680d0 sets it to parent+0x33c; update_target 00967650 uses it as the throw origin - Vector _initPosition; // ? only written: Entity_Knife::Init 00960c10 copies pos into +0x454/+0x458 (ctor zeroes it); no reader in the dump - float _maxDistance; // Lua EntityKnife.MaxDistance via binder 00889f70: getter 008c04f0 pushnumber, setter checknumber -> float - float _charge; // Lua EntityKnife.Charge via binder 00889f70: getter 008c04f0 pushnumber, setter checknumber -> float - bool _isFlying; - bool _isSwinging; // Entity_Knife::SetAttackAnimation 009680d0 (Attack*/Swing anims) sets this+0x465=1 (word 0x101 with +0x466); SpinAttack 00968430 sets it too - uint8_t _pad_0x466[0x1]; - bool _isPrimaryClub; // Weapon_Bone::Fire 009fa450 sets knife+0x467 = (slot == 0) on the clubs it creates; Entity_Knife::UpdateSwingHits 009688d0 at swing end calls Entity_Player::ClearDeadEyeCharge only for it (unless _isDeadEyeHit); Init 00960c10 zeroes it - HomingLaser _homingLaser; // ctor 00960a70 runs the HomingLaser init 0099c290 there; InitHomingPath 00961320 resets _samples (+0x484/+0x490), _unkVec (+0x49c), _bezier (+0x4b0), sets _origin +0x46c=pos, _endPoint +0x474, _sampleNum +0x480=30, then HomingLaser::build_bezier_path; Update walks the 0x18-byte bezier entries at +0x4b0; Free tidies +0x4b0 - int _pathSegment; // Entity_Knife::Update 00961b00 searches bezier segments of _homingLaser from index +0x4bc (bezier_closest_point) and stores the chosen segment back; InitHomingPath 00961320 / Init reset it to 0 - float _pathProgress; // Entity_Knife::Update 00961b00 stores the closest bezier t (must not go backwards within the current segment) and evaluates the cubic at t and t+_pathFollowSpeed; InitHomingPath / Init set -100.0 - float _pathOffset; - float _pathFollowSpeed; - float _height; // Entity_Knife::Update 00961b00: +0x4cc += +0x4d0 each frame, clamped to 0 on landing, posOffset.y = +0x4cc + +0x4d4; Shoot 00966ef0 resets it to 0 for the hop - float _fallingSpeed; // Entity_Knife::Update 00961b00 adds 1.5 per frame (gravity) and adds it to +0x4cc; Shoot 00966ef0 sets -10.0 (jump) when the tear-flag mask 0xc345e0 is set - float _basePosOffsetY; // Entity_Knife::Update 00961b00 saves posOffset.y into +0x4d4 and later sets posOffset.y = _height(+0x4cc) + +0x4d4; copied from the parent knife with +0x4cc/+0x4d0 - uint8_t _hitList[0xc]; // std_vector_uint; Entity_Knife::GetHitEntities 009612e0 returns this+0x4d8 (of the root knife); Shoot/SetAttackAnimation/SpinAttack clear it (end=begin +0x4dc); ctor zeroes +0x4d8..+0x4e0, Free tidies it - bool _isDeadEyeHit; // Entity_Knife::UpdateSwingHits 009688d0 with Dead Eye (373) calls AddDeadEyeCharge only while +0x4e4==0, then sets it; at swing end on the primary club clears Dead Eye charge if 0 and resets it; SetAttackAnimation 009680d0 / SpinAttack 00968430 / Init 00960c10 clear it - bool _prismApplied; // Entity_Knife::spawn_child_knife 00961870, called from the Angelic Prism block of Entity_Familiar::Update 0061da10 for flying knives, returns if this+0x4e5 set then sets it - bool _multidimensionalApplied; // Entity_Familiar::multidimensional_baby_copy_knife 009615e0 returns if knife+0x4e6 set, then sets it to 1 and spawns the two copies - bool _isUsingParentHitList; // Entity_Knife::GetHitEntities 009612e0 walks to the parent knife (+0x3bc, type 8) while this+0x4e7 is set; apply_hit_effects 0096ae70 sets it on the knives it spawns; Init clears it - uint8_t _pad_0x4e8[0x2]; - bool _isSpinAttack; // Entity_Knife::SpinAttack 00968430 (Spin* anims) sets this+0x4ea=1; SetAttackAnimation 009680d0 clears it - uint8_t _pad_0x4eb[0x35]; -}; -static_assert(offsetof(Entity_Knife, _damageEvents) == 0x8); -static_assert(offsetof(Entity_Knife, _pendingDamage) == 0x14); -static_assert(offsetof(Entity_Knife, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity_Knife, _index) == 0x20); -static_assert(offsetof(Entity_Knife, _collisionIndex) == 0x24); -static_assert(offsetof(Entity_Knife, _type) == 0x28); -static_assert(offsetof(Entity_Knife, _variant) == 0x2c); -static_assert(offsetof(Entity_Knife, _subtype) == 0x30); -static_assert(offsetof(Entity_Knife, _spawnerType) == 0x34); -static_assert(offsetof(Entity_Knife, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity_Knife, _sprite) == 0x48); -static_assert(offsetof(Entity_Knife, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity_Knife, _spriteScale) == 0xe4); -static_assert(offsetof(Entity_Knife, _isFlipX) == 0x148); -static_assert(offsetof(Entity_Knife, _shadowSize) == 0x15c); -static_assert(offsetof(Entity_Knife, _shadowOffset) == 0x160); -static_assert(offsetof(Entity_Knife, _flags) == 0x168); -static_assert(offsetof(Entity_Knife, _valid) == 0x170); -static_assert(offsetof(Entity_Knife, _visible) == 0x171); -static_assert(offsetof(Entity_Knife, _exists) == 0x172); -static_assert(offsetof(Entity_Knife, _dead) == 0x173); -static_assert(offsetof(Entity_Knife, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity_Knife, _isInterpolating) == 0x175); -static_assert(offsetof(Entity_Knife, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity_Knife, _removedByFactory) == 0x177); -static_assert(offsetof(Entity_Knife, _collisionPoints) == 0x178); -static_assert(offsetof(Entity_Knife, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity_Knife, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity_Knife, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity_Knife, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity_Knife, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity_Knife, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity_Knife, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity_Knife, _colorParams) == 0x1ac); -static_assert(offsetof(Entity_Knife, _color) == 0x1b8); -static_assert(offsetof(Entity_Knife, _splatColor) == 0x1e4); -static_assert(offsetof(Entity_Knife, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity_Knife, _damageCountdown) == 0x214); -static_assert(offsetof(Entity_Knife, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity_Knife, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity_Knife, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity_Knife, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity_Knife, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity_Knife, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity_Knife, _fearCountdown) == 0x230); -static_assert(offsetof(Entity_Knife, _burnCountdown) == 0x234); -static_assert(offsetof(Entity_Knife, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity_Knife, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity_Knife, _charmSource) == 0x240); -static_assert(offsetof(Entity_Knife, _entityRef2) == 0x268); -static_assert(offsetof(Entity_Knife, _entityRef3) == 0x290); -static_assert(offsetof(Entity_Knife, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity_Knife, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity_Knife, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity_Knife, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity_Knife, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity_Knife, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity_Knife, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity_Knife, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity_Knife, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity_Knife, _iceCountdown) == 0x300); -static_assert(offsetof(Entity_Knife, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity_Knife, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity_Knife, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity_Knife, _pausePosition) == 0x314); -static_assert(offsetof(Entity_Knife, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity_Knife, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity_Knife, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity_Knife, _spawnFrame) == 0x328); -static_assert(offsetof(Entity_Knife, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity_Knife, _config) == 0x330); -static_assert(offsetof(Entity_Knife, _targetPosition) == 0x334); -static_assert(offsetof(Entity_Knife, _pos) == 0x33c); -static_assert(offsetof(Entity_Knife, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity_Knife, _posOffset) == 0x34c); -static_assert(offsetof(Entity_Knife, _renderZOffset) == 0x354); -static_assert(offsetof(Entity_Knife, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity_Knife, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity_Knife, _velocity) == 0x360); -static_assert(offsetof(Entity_Knife, _baseFriction) == 0x368); -static_assert(offsetof(Entity_Knife, _friction) == 0x36c); -static_assert(offsetof(Entity_Knife, _size) == 0x370); -static_assert(offsetof(Entity_Knife, _sizeMulti) == 0x374); -static_assert(offsetof(Entity_Knife, _mass) == 0x37c); -static_assert(offsetof(Entity_Knife, _health) == 0x380); -static_assert(offsetof(Entity_Knife, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity_Knife, _collisionDamage) == 0x388); -static_assert(offsetof(Entity_Knife, _prevPosition) == 0x38c); -static_assert(offsetof(Entity_Knife, _prevVelocity) == 0x394); -static_assert(offsetof(Entity_Knife, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity_Knife, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity_Knife, _updateTime) == 0x3a4); -static_assert(offsetof(Entity_Knife, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity_Knife, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity_Knife, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity_Knife, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity_Knife, _parent) == 0x3bc); -static_assert(offsetof(Entity_Knife, _child) == 0x3c0); -static_assert(offsetof(Entity_Knife, _target) == 0x3c4); -static_assert(offsetof(Entity_Knife, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity_Knife, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity_Knife, _minecart) == 0x3d4); -static_assert(offsetof(Entity_Knife, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity_Knife, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity_Knife, _initSeed) == 0x3ec); -static_assert(offsetof(Entity_Knife, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity_Knife, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity_Knife, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity_Knife, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity_Knife, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity_Knife, _luaBridgeRef) == 0x408); -static_assert(offsetof(Entity_Knife, _tearFlags) == 0x410); -static_assert(offsetof(Entity_Knife, _usedTearFlags) == 0x420); -static_assert(offsetof(Entity_Knife, _scale) == 0x430); -static_assert(offsetof(Entity_Knife, _knifeDepthOffset) == 0x434); -static_assert(offsetof(Entity_Knife, _rotation) == 0x438); -static_assert(offsetof(Entity_Knife, _rotationOffset) == 0x43c); -static_assert(offsetof(Entity_Knife, _displayRotation) == 0x440); -static_assert(offsetof(Entity_Knife, _knifeDistance) == 0x444); -static_assert(offsetof(Entity_Knife, _knifeVelocity) == 0x448); -static_assert(offsetof(Entity_Knife, _anchorPosition) == 0x44c); -static_assert(offsetof(Entity_Knife, _initPosition) == 0x454); -static_assert(offsetof(Entity_Knife, _maxDistance) == 0x45c); -static_assert(offsetof(Entity_Knife, _charge) == 0x460); -static_assert(offsetof(Entity_Knife, _isFlying) == 0x464); -static_assert(offsetof(Entity_Knife, _isSwinging) == 0x465); -static_assert(offsetof(Entity_Knife, _isPrimaryClub) == 0x467); -static_assert(offsetof(Entity_Knife, _homingLaser) == 0x468); -static_assert(offsetof(Entity_Knife, _pathSegment) == 0x4bc); -static_assert(offsetof(Entity_Knife, _pathProgress) == 0x4c0); -static_assert(offsetof(Entity_Knife, _pathOffset) == 0x4c4); -static_assert(offsetof(Entity_Knife, _pathFollowSpeed) == 0x4c8); -static_assert(offsetof(Entity_Knife, _height) == 0x4cc); -static_assert(offsetof(Entity_Knife, _fallingSpeed) == 0x4d0); -static_assert(offsetof(Entity_Knife, _basePosOffsetY) == 0x4d4); -static_assert(offsetof(Entity_Knife, _hitList) == 0x4d8); -static_assert(offsetof(Entity_Knife, _isDeadEyeHit) == 0x4e4); -static_assert(offsetof(Entity_Knife, _prismApplied) == 0x4e5); -static_assert(offsetof(Entity_Knife, _multidimensionalApplied) == 0x4e6); -static_assert(offsetof(Entity_Knife, _isUsingParentHitList) == 0x4e7); -static_assert(offsetof(Entity_Knife, _isSpinAttack) == 0x4ea); -static_assert(sizeof(Entity_Knife) == 0x520); - -struct Entity_Laser { // : Entity (flattened) - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x4]; - Vector _parentOffset; // Lua EntityLaser.ParentOffset via binder 00888a70: getter 008bfac0 UserdataValue 8-byte copy - float _startAngleDegrees; // Lua EntityLaser.StartAngleDegrees via binder 00888be0: getter 008bfc00 pushnumber, setter 008bfc60 checknumber -> float - float _angleDegrees; // Lua EntityLaser.AngleDegrees via binder 00888be0: getter 008bfc00 pushnumber, setter 008bfc60 checknumber -> float - float _lastAngleDegrees; // Lua EntityLaser.LastAngleDegrees via binder 00888be0: getter 008bfc00 pushnumber, setter 008bfc60 checknumber -> float - uint8_t _pad_0x424[0x4]; - BitSet128 _tearFlags; - BitSet128 _activeTearFlags; // Entity_Laser::update_laser 00973c60 and UpdateHits 0097baa0 copy _tearFlags (0x428..0x434) into 0x438..0x444 each update (only the first one for _oneHit lasers); impact_tear_flag_effects 0096d3f0 clears one-shot flag groups from it after triggering them; ctor 0096cb60 / Init 0096f590 zero it - BitSet128 _heldTearFlags; // ? Entity_Laser::Update 00977cc0 moves TEAR_WAIT out of _tearFlags into this+0x448..0x454 (OR) when it spawns the Anti-Gravity effect; ctor/Init zero 16 bytes - int _timeout; - bool _isFirstUpdate; // Lua EntityLaser.FirstUpdate via binder 00889050: getter 008bfeb0 pushboolean(byte), setter toboolean -> bool - bool _sampleLaser; - bool _shrink; - uint8_t _pad_0x45f[0x1]; - float _laserLength; // Lua EntityLaser.LaserLength via binder 00888be0: getter 008bfc00 pushnumber, setter 008bfc60 checknumber -> float - HomingLaser _homingLaser; - float _curveStrength; // Lua EntityLaser.CurveStrength via binder 00888be0: getter 008bfc00 pushnumber, setter 008bfc60 checknumber -> float - float _radius; // Lua EntityLaser.Radius via binder 00888be0: getter 008bfc00 pushnumber, setter 008bfc60 checknumber -> float - bool _isActiveRotating; // Lua EntityLaser.IsActiveRotating via binder 00889050: getter 008bfeb0 pushboolean(byte), setter toboolean -> bool - uint8_t _pad_0x4c1[0x3]; - uint32_t _rotationDelay; // Lua EntityLaser.RotationDelay via binder 008894c0: getter 008c0230 dword via FUN_0085bff0 (unsigned pushinteger), setter dword - float _rotationDegrees; // Lua EntityLaser.RotationDegrees via binder 00888be0: getter 008bfc00 pushnumber, setter 008bfc60 checknumber -> float - float _rotationSpd; // Lua EntityLaser.RotationSpd via binder 00888be0: getter 008bfc00 pushnumber, setter 008bfc60 checknumber -> float - float _maxDistance; - uint32_t _homingType; - Vector _endPoint; - float _scale; // Entity_Laser::ResetSpriteScale 0097fc10 sets sprite scale and _size = it * config size; Entity_Laser::set_scale 0097fe50 writes +0x4e0; Entity_Laser::Init 0096f590 sets 1.0 - bool _disableFollowParent; - uint8_t _pad_0x4e5[0x3]; - uint32_t _bounceLaser; // Entity* // Lua EntityLaser.BounceLaser via binder 008897c0: getter 008c03c0 UserdataPtr Entity key c8297a, setter stores pointer - uint8_t _childLaser[0x8]; // EntityPtr; ? Entity_Laser::Remove 0097ea30 removes it with the laser (unless _oneHit) like _bounceLaser(+0x4e8); ClearReferences resets; Init zeroes; setter not found - float _blackHpDropChance; // Lua EntityLaser.BlackHpDropChance via binder 00888be0: getter 008bfc00 pushnumber, setter 008bfc60 checknumber -> float - uint8_t _multidimensionalLasers[0x8]; // EntityPtr; Entity_Laser::update_laser 00973c60 (player-spawned, !_multidimensionalTouched) ShootAngle()s two lasers into +0x4f8/+0x4fc (multiset insert), sets their _disableFollowParent and _multidimensionalTouched, repositions them each frame and Remove()s them when no target; Remove 0097ea30 / ClearReferences 0097e800 loop 2 slots; Init 0096f590 zeroes - bool _multidimensionalTouched; // Lua EntityLaser:SetMultidimensionalTouched 005cd590 writes byte this+0x500; Entity_Laser::copy_from_parent 0096f070 copies it - uint8_t _pad_0x501[0x3]; - uint8_t _prismLasers[0x10]; // EntityPtr; Entity_Laser::update_laser 00973c60 (!_prismTouched, HomingLaser::find_targets) checks the 4 slots +0x504..+0x510 and spawns the Angelic Prism split lasers into them; Remove 0097ea30 / ClearReferences 0097e800 loop 4 slots from +0x504; Init 0096f590 zeroes them - bool _prismTouched; // Entity_Laser::update_laser 00973c60 only looks for an Angelic Prism (3.123) while +0x514==0 and sets +0x514=1 on the split child lasers it spawns (stored at 0x504..0x510); copy_from_parent 0096f070 copies it; Init 0096f590 zeroes it - bool _oneHit; - bool _isGridHit; // Lua EntityLaser.GridHit via binder 00889050: getter 008bfeb0 pushboolean(byte), setter toboolean -> bool - uint8_t _pad_0x517[0x1]; - bool _disableInitSound; // Entity_Laser::PlayInitSound 0096f880 returns at once if this+0x518 != 0; update_laser 00973c60 sets it on chained child lasers it spawns - uint8_t _pad_0x519[0x3]; - float _damageMultiplier; // Entity_Player::FireTechLaser 007aab70 stores its damageScale arg in laser+0x51c; Entity_Laser::Init 0096f590 sets 1.0 - uint8_t _hitList[0xc]; // std_vector_uint; Entity_Laser::CanDamageEntity 0096cf80 passes this+0x520 (or the parent laser chain via +0x52c) to EntityList::HitListContains - uint8_t _parentLaser[0x4]; // EntityPtr; Game::BombTearflagEffects 007009a0 sets it (multiset insert); Update and CanDamageEntity 0096cf80 walk this+0x52c->+0x52c to the root laser whose hit list is shared; ClearReferences resets - uint8_t _subLasers[0x8]; // EntityPtr; ? ctor 0096cb60 eh-vector-constructs 2 EntityPtrs at +0x530; Remove 0097ea30 removes both unless _oneHit; ClearReferences resets them - uint8_t _continuumLaser[0x4]; // EntityPtr; Entity_Laser::update_laser 00973c60: with TEAR_CONTINUUM (bit 38) spawns the wrapped laser at the room edge via ShootAngle into this+0x538 (sets its _disableInitSound/_disableFollowParent); Remove/ClearReferences free it - uint8_t _tearWaitEffect[0x4]; // EntityPtr; Entity_Laser::Update 00977cc0: with TEAR_WAIT (bit 17, Anti-Gravity) spawns effect 1000.71/126 into this+0x53c, copies tear flags/colour to it; laser stays frozen while that effect's state (+0x450) is 0; ClearReferences resets it - int _waitFrames; // Entity_Laser::Update 00977cc0 sets 2 (hidden) with the Anti-Gravity effect and returns early while it counts down; Interpolate 0097e6f0 skips while >0; update_laser sets it on OneHit continuum lasers; Init zeroes - float _impactDistance; // Entity_Laser::update_line_hits 00971810 keeps the smallest blocking distance along the beam here (with the point in +0x548 and direction in +0x550); Init 0096f590 sets +inf (0x7f800000); UpdateHits 0097baa0 calls impact_tear_flag_effects when it is finite or _isGridHit - Vector _impactPosition; // Entity_Laser::update_line_hits 00971810 stores the closest blocking point (with _impactDistance); UpdateHits 0097baa0 passes &this+0x548 as the position to impact_tear_flag_effects 0096d3f0; ctor 0096cb60 zeroes it - Vector _impactDirection; // Entity_Laser::update_line_hits 00971810 stores the normalized beam-segment direction with the closest blocking point; UpdateHits 0097baa0 passes &this+0x550 as the direction to impact_tear_flag_effects 0096d3f0; ctor 0096cb60 zeroes it - float _subLaserDistance; // ? Entity_Laser::update_laser 00973c60: with the split-laser tear flags, stores _impactDistance (lerped from the old value when blocked) here and spawns/places the 2 _subLasers at that distance; sets +inf when not; Init 0096f590 sets +inf - float _subLaserAngle; // ? Entity_Laser::update_laser 00973c60 stores the beam angle (get_segment_start_dir angle, approach_angle toward it when blocked) at +0x55c and fires/aims the 2 _subLasers from it (SetAimAngle); Init 0096f590 zeroes it - int _chainedLasers; // Entity_Laser::update_laser 00973c60 spawns a child laser with child+0x560 = this+0x560 - 1 while > 0, then zeroes it; copy_from_parent 0096f070 copies it - uint8_t _pad_0x564[0x4]; -}; -static_assert(offsetof(Entity_Laser, _damageEvents) == 0x8); -static_assert(offsetof(Entity_Laser, _pendingDamage) == 0x14); -static_assert(offsetof(Entity_Laser, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity_Laser, _index) == 0x20); -static_assert(offsetof(Entity_Laser, _collisionIndex) == 0x24); -static_assert(offsetof(Entity_Laser, _type) == 0x28); -static_assert(offsetof(Entity_Laser, _variant) == 0x2c); -static_assert(offsetof(Entity_Laser, _subtype) == 0x30); -static_assert(offsetof(Entity_Laser, _spawnerType) == 0x34); -static_assert(offsetof(Entity_Laser, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity_Laser, _sprite) == 0x48); -static_assert(offsetof(Entity_Laser, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity_Laser, _spriteScale) == 0xe4); -static_assert(offsetof(Entity_Laser, _isFlipX) == 0x148); -static_assert(offsetof(Entity_Laser, _shadowSize) == 0x15c); -static_assert(offsetof(Entity_Laser, _shadowOffset) == 0x160); -static_assert(offsetof(Entity_Laser, _flags) == 0x168); -static_assert(offsetof(Entity_Laser, _valid) == 0x170); -static_assert(offsetof(Entity_Laser, _visible) == 0x171); -static_assert(offsetof(Entity_Laser, _exists) == 0x172); -static_assert(offsetof(Entity_Laser, _dead) == 0x173); -static_assert(offsetof(Entity_Laser, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity_Laser, _isInterpolating) == 0x175); -static_assert(offsetof(Entity_Laser, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity_Laser, _removedByFactory) == 0x177); -static_assert(offsetof(Entity_Laser, _collisionPoints) == 0x178); -static_assert(offsetof(Entity_Laser, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity_Laser, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity_Laser, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity_Laser, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity_Laser, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity_Laser, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity_Laser, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity_Laser, _colorParams) == 0x1ac); -static_assert(offsetof(Entity_Laser, _color) == 0x1b8); -static_assert(offsetof(Entity_Laser, _splatColor) == 0x1e4); -static_assert(offsetof(Entity_Laser, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity_Laser, _damageCountdown) == 0x214); -static_assert(offsetof(Entity_Laser, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity_Laser, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity_Laser, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity_Laser, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity_Laser, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity_Laser, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity_Laser, _fearCountdown) == 0x230); -static_assert(offsetof(Entity_Laser, _burnCountdown) == 0x234); -static_assert(offsetof(Entity_Laser, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity_Laser, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity_Laser, _charmSource) == 0x240); -static_assert(offsetof(Entity_Laser, _entityRef2) == 0x268); -static_assert(offsetof(Entity_Laser, _entityRef3) == 0x290); -static_assert(offsetof(Entity_Laser, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity_Laser, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity_Laser, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity_Laser, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity_Laser, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity_Laser, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity_Laser, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity_Laser, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity_Laser, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity_Laser, _iceCountdown) == 0x300); -static_assert(offsetof(Entity_Laser, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity_Laser, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity_Laser, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity_Laser, _pausePosition) == 0x314); -static_assert(offsetof(Entity_Laser, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity_Laser, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity_Laser, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity_Laser, _spawnFrame) == 0x328); -static_assert(offsetof(Entity_Laser, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity_Laser, _config) == 0x330); -static_assert(offsetof(Entity_Laser, _targetPosition) == 0x334); -static_assert(offsetof(Entity_Laser, _pos) == 0x33c); -static_assert(offsetof(Entity_Laser, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity_Laser, _posOffset) == 0x34c); -static_assert(offsetof(Entity_Laser, _renderZOffset) == 0x354); -static_assert(offsetof(Entity_Laser, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity_Laser, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity_Laser, _velocity) == 0x360); -static_assert(offsetof(Entity_Laser, _baseFriction) == 0x368); -static_assert(offsetof(Entity_Laser, _friction) == 0x36c); -static_assert(offsetof(Entity_Laser, _size) == 0x370); -static_assert(offsetof(Entity_Laser, _sizeMulti) == 0x374); -static_assert(offsetof(Entity_Laser, _mass) == 0x37c); -static_assert(offsetof(Entity_Laser, _health) == 0x380); -static_assert(offsetof(Entity_Laser, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity_Laser, _collisionDamage) == 0x388); -static_assert(offsetof(Entity_Laser, _prevPosition) == 0x38c); -static_assert(offsetof(Entity_Laser, _prevVelocity) == 0x394); -static_assert(offsetof(Entity_Laser, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity_Laser, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity_Laser, _updateTime) == 0x3a4); -static_assert(offsetof(Entity_Laser, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity_Laser, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity_Laser, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity_Laser, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity_Laser, _parent) == 0x3bc); -static_assert(offsetof(Entity_Laser, _child) == 0x3c0); -static_assert(offsetof(Entity_Laser, _target) == 0x3c4); -static_assert(offsetof(Entity_Laser, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity_Laser, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity_Laser, _minecart) == 0x3d4); -static_assert(offsetof(Entity_Laser, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity_Laser, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity_Laser, _initSeed) == 0x3ec); -static_assert(offsetof(Entity_Laser, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity_Laser, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity_Laser, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity_Laser, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity_Laser, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity_Laser, _luaBridgeRef) == 0x408); -static_assert(offsetof(Entity_Laser, _parentOffset) == 0x410); -static_assert(offsetof(Entity_Laser, _startAngleDegrees) == 0x418); -static_assert(offsetof(Entity_Laser, _angleDegrees) == 0x41c); -static_assert(offsetof(Entity_Laser, _lastAngleDegrees) == 0x420); -static_assert(offsetof(Entity_Laser, _tearFlags) == 0x428); -static_assert(offsetof(Entity_Laser, _activeTearFlags) == 0x438); -static_assert(offsetof(Entity_Laser, _heldTearFlags) == 0x448); -static_assert(offsetof(Entity_Laser, _timeout) == 0x458); -static_assert(offsetof(Entity_Laser, _isFirstUpdate) == 0x45c); -static_assert(offsetof(Entity_Laser, _sampleLaser) == 0x45d); -static_assert(offsetof(Entity_Laser, _shrink) == 0x45e); -static_assert(offsetof(Entity_Laser, _laserLength) == 0x460); -static_assert(offsetof(Entity_Laser, _homingLaser) == 0x464); -static_assert(offsetof(Entity_Laser, _curveStrength) == 0x4b8); -static_assert(offsetof(Entity_Laser, _radius) == 0x4bc); -static_assert(offsetof(Entity_Laser, _isActiveRotating) == 0x4c0); -static_assert(offsetof(Entity_Laser, _rotationDelay) == 0x4c4); -static_assert(offsetof(Entity_Laser, _rotationDegrees) == 0x4c8); -static_assert(offsetof(Entity_Laser, _rotationSpd) == 0x4cc); -static_assert(offsetof(Entity_Laser, _maxDistance) == 0x4d0); -static_assert(offsetof(Entity_Laser, _homingType) == 0x4d4); -static_assert(offsetof(Entity_Laser, _endPoint) == 0x4d8); -static_assert(offsetof(Entity_Laser, _scale) == 0x4e0); -static_assert(offsetof(Entity_Laser, _disableFollowParent) == 0x4e4); -static_assert(offsetof(Entity_Laser, _bounceLaser) == 0x4e8); -static_assert(offsetof(Entity_Laser, _childLaser) == 0x4ec); -static_assert(offsetof(Entity_Laser, _blackHpDropChance) == 0x4f4); -static_assert(offsetof(Entity_Laser, _multidimensionalLasers) == 0x4f8); -static_assert(offsetof(Entity_Laser, _multidimensionalTouched) == 0x500); -static_assert(offsetof(Entity_Laser, _prismLasers) == 0x504); -static_assert(offsetof(Entity_Laser, _prismTouched) == 0x514); -static_assert(offsetof(Entity_Laser, _oneHit) == 0x515); -static_assert(offsetof(Entity_Laser, _isGridHit) == 0x516); -static_assert(offsetof(Entity_Laser, _disableInitSound) == 0x518); -static_assert(offsetof(Entity_Laser, _damageMultiplier) == 0x51c); -static_assert(offsetof(Entity_Laser, _hitList) == 0x520); -static_assert(offsetof(Entity_Laser, _parentLaser) == 0x52c); -static_assert(offsetof(Entity_Laser, _subLasers) == 0x530); -static_assert(offsetof(Entity_Laser, _continuumLaser) == 0x538); -static_assert(offsetof(Entity_Laser, _tearWaitEffect) == 0x53c); -static_assert(offsetof(Entity_Laser, _waitFrames) == 0x540); -static_assert(offsetof(Entity_Laser, _impactDistance) == 0x544); -static_assert(offsetof(Entity_Laser, _impactPosition) == 0x548); -static_assert(offsetof(Entity_Laser, _impactDirection) == 0x550); -static_assert(offsetof(Entity_Laser, _subLaserDistance) == 0x558); -static_assert(offsetof(Entity_Laser, _subLaserAngle) == 0x55c); -static_assert(offsetof(Entity_Laser, _chainedLasers) == 0x560); -static_assert(sizeof(Entity_Laser) == 0x568); - -struct Entity_NPC { // : Entity (flattened) - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x4]; - int _stateFrame; - NPCAI_Pathfinder _pathfinder; - uint8_t _pad_0xb5c[0x8]; - int _state; - int _savedState; // Entity_NPC::Update 006c4b30 stores _state here and sets _state=1 while FLAG_APPEAR is set, restores _state from it afterwards; Init 006b8b20 zeroes - int _aiCounter; // ? generic AI int: Init 006b8b20 zeroes; NpcHelper::moms_heart_attack_pattern 004d33d0 / ENTITY_MOMS_HEART 004d48b0 use it as a phase (==3, =4), Bumbino/Gideon count with it - int _appearFrames; // Entity_NPC::Update 006c4b30 counts up while _state==1 (appear) and runs the init AI call when it is 0; Init zeroes - int _aiCallPhase; // Entity_NPC::Update 006c4b30 sets 1 (pre/paused call), 4 (post-update call), HandleCollision 006cd410 sets 3 (collision call) around Entity_NPC_UpdateAI_dispatch, then 0; Beast AIs branch on ==1 - bool _collisionIsLow; // Entity_NPC::HandleCollision 006cd410 stores its 'low' argument here before the phase-3 AI call - uint8_t _pad_0xb79[0x3]; - uint32_t _collisionEntity; // Entity* // Entity_NPC::HandleCollision 006cd410 stores the collider here for the phase-3 AI call; AIs read collider+0x28 type, compare with _parent/_spawnerEntity - int _collisionResult; // Entity_NPC::HandleCollision 006cd410 sets -1 before the phase-3 AI call; AI writes 0 (ignore collision) or >0 (block); HandleCollision returns accordingly - int _decoyTargetTimer; // ? Entity_NPC::Update 006c4b30 counts it up while the target is familiar 3.67 (Punching Bag), wraps to -1 past 180, decays toward 0; GetPlayerTarget 006be840 ignores decoys while it is <0 - uint8_t _killDamageEvents[0xc]; // vector_DamageEvent; Entity_NPC::Kill 006be6f0 copies Entity +0x8 damage events here (vector::assign_0x38) together with 0xb94/0xb98 before Entity::Kill; Init clears it - float _killDamage; // Entity_NPC::Kill 006be6f0 copies Entity _pendingDamage (+0x14) here - uint64_t _killDamageFlags; // Entity_NPC::Kill 006be6f0 copies Entity _pendingDamageFlags (+0x18/+0x1c) here; NpcHelper::ChampionDrop 006bf120 reads it - int _projectileCooldown; - int _projectileDelay; - int _championTimer; // Entity_NPC::MakeChampion 006d03e0 sets Random%20+40 for colors 10/25; Update 006c4b30 decrements and shoots/respawns at <1; TakeDamage 006d60a0 (color 21) gates on it and sets 60 - float _championSpeed; // Entity_NPC::MakeChampion 006d03e0 sets 1.333 (yellow/rainbow), 0.8 (dark blue/grey), scales it for tiny/giant; Update 006c4b30 friction = 1-(1-this)*(1-friction); Init/Morph reset 1.0 - Vector _v1; - Vector _v2; - int _i1; - int _i2; - uint32_t _deliriumBossType; // NpcAI::ENTITY_DELIRIUM 004a6500 picks a boss, logs 'Changed Delirium form to %d:%u.' with it and writes it into _type - uint32_t _deliriumBossVariant; // NpcAI::ENTITY_DELIRIUM 004a6500 logs 'Changed Delirium form to %d:%u.' with it (second arg) and writes it into _variant - uint16_t _deliriumTransformationTimer; // NpcAI::ENTITY_DELIRIUM 004a6500: ushort countdown decremented in states 0x11/8, drives Game::ShowHallucination(timer*0.4*30), reset to random*0x1e between forms - uint8_t _deliriumRemainingAttacks; // NpcAI::ENTITY_DELIRIUM 004a6500 sets it to rand%3+2 on a new form, decrements per attack and leaves state 8 when 0 - uint8_t _deliriumState; // NpcAI::ENTITY_DELIRIUM 004a6500 byte state machine (0x10 pick form, 0x11 hallucination, 0x12) separate from _state 0xb64 - uint8_t _pad_0xbd4[0x4]; - uint32_t _deliriumAttackID; // NpcHelper::delirium_fire_pattern 004a8b70 unpacks it (low byte = pattern, 0xff = random %0xb) and repacks it; ENTITY_DELIRIUM 004a6500 resets it to 0xff per form - uint8_t _deliriumAttackAngle; // NpcHelper::delirium_fire_pattern 004a8b70 reads it as the pattern angle and stores (Random()%0xff)&0xff back; ENTITY_DELIRIUM 004a6500 zeroes it per form (written as a dword) - uint8_t _pad_0xbdd[0x3]; - uint32_t _deliriumCycleID; // NpcAI::ENTITY_DELIRIUM 004a6500 keeps packed bitfields here (low 7 bits form cycle, (rand%600+300)<<15 timer) updated on every form change - uint32_t _deliriumCycleIDHigh; // NpcAI::ENTITY_DELIRIUM 004a6500 builds a bitfield across _deliriumCycleID (0xbe0)>>25 | (0xbe4&7)<<7 and zeroes 0xbe4 when it rewrites 0xbe0 - uint32_t _deliriumEntity; // Entity* // ? NpcAI::ENTITY_DELIRIUM 004a6500 reads it and tests its _dead (+0x173); Init 006b8b20 zeroes it - uint8_t _entityRef[0x4]; // EntityPtr; Lua EntityNPC.EntityRef 004e4850 returns *(this+0xbec); AIs assign it via multiset insert/erase (EntityPtr), Init zeroes; 45 AIs use it as their linked entity - uint8_t _entityDeque[0x14]; // deque_EntityPtr; Entity_NPC::Constructor 006b8590 builds a std::deque (proxy new(8), 5 dwords 0xbf0..0xc00); Hornfel_UpdateAI 004b92e0 calls std::deque::resize(2) and indexes map 0xbf4/mapsize 0xbf8/off 0xbfc (4 per block) - uint8_t _vectorDeque1[0x14]; // deque_Vector; Entity_NPC::Constructor 006b8590 builds a std::deque (proxy, 0xc04..0xc14); std::deque::assign(&npc+0xc04) in Evis/Chub/Dogma AIs, map 0xc08, off 0xc10 (2 per block) - uint8_t _vectorDeque2[0x14]; // deque_Vector; Entity_NPC::Constructor 006b8590 builds a std::deque (proxy, 0xc18..0xc28); std::deque::assign(&npc+0xc18) (Beast soul 005971e0), Dogma/Wormwood index map 0xc1c/off 0xc24 - Vector _confusionTargetPos; // Entity_NPC::CalcTargetPosition 006bec40: with FLAG_CONFUSION (0x200) it picks a random clamped spot every 15 frames into 0xc2c/0xc30 and returns it; Init zeroes - float _aiFloat; // generic AI scratch float: Init 006b8b20 sets 1.0; Lamb/War/Beast/Gemini AIs store speeds/thresholds (e.g. maxHP*0.4) in it - float _scale; // Lua EntityNPC.Scale 004567a0 returns this+0xc38; MakeChampion 006d03e0 sets the tiny/giant scale; Init/Morph 1.0 - bool _canShutDoors; // Entity_NPC::CanShutDoors 006b8450 (vtable 18) returns it unless FLAG_FRIENDLY; 00436220 (named Entity::SetVisibleFlag) sets it to arg unless FLAG_FRIENDLY; Update 006c4b30 clears it when unreachable twice or no bosses alive - bool _isBoss; // Entity_NPC::IsBoss 006b8470 (vtable slot 19) is MOV AL,[ECX+0xc3d]; champion_init 006bb790 copies EntityConfig isBoss (+0x2c) into it - bool _isUnreachableOnce; // ? Entity_NPC::Update 006c4b30: first time no player has a path it sets 0xc3e=1, the next time it clears _canShutDoors; Init clears - uint8_t _pad_0xc3f[0x1]; - float _shieldStrength; // Entity_NPC::champion_init 006bb790 copies EntityConfig shieldStrength (+0xe0); NpcAI::ENTITY_DELIRIUM 004a6500 sets it from lost health *80; ENTITY_ISAAC 00463100 sets 90 - int _shieldFrames; // Entity_NPC::champion_init 006bb790 copies EntityConfig shieldFrames (+0xe4); Init 006b8b20 / Delirium / Ultra Greed set 120 - uint8_t _pad_0xc48[0x14]; - float _totalDamageTaken; // Entity_NPC::Update 006c4b30 adds max(0, hp before - hp after Entity::Update) each update; Init/Morph zero it - bool _isBestiaryEncountered; // Entity_NPC::Update 006c4b30 calls PersistentGameData::TryAddBestiaryEncounter(type,variant) once and sets it; Init/Morph clear - uint8_t _pad_0xc61[0x2]; - bool _isChampion; - int _championColorIdx; - int _flickerTimer; // Entity_NPC::Update 006c4b30 flicker champion (color 9) / type 252 state machine: countdown, reset to 60+Random(30) - int _flickerState; // Entity_NPC::Update 006c4b30 flicker champion state 0 wait, 1 fade out, 2 fade in, 3 invisible - float _flickerAlpha; // Entity_NPC::Update 006c4b30 steps it by 0.05 between 0 and 1 and applies it as the sprite alpha; Init 1.0 - uint16_t _championRegenTimer; // Entity_NPC::Update 006c4b30: for champion colour 12 on death sets it to 1, revives at 10 HP, counts it up per HP lost shrinking/growing the sprite ('ReGenChamp' Globin anm2) and resets to 0 after 0x59 - short _championRegenCount; // Entity_NPC::Update 006c4b30 increments it each time the dark red champion (12) regenerates; Clotty/Hive/Mulligan/Hopper AIs scale spawns by it - int _bosscoloridx; - int _groupIdx; // Lua EntityNPC.GroupIdx via binder 008877e0: getter 008bf5b0 FUN_0085bfd0 signed dword, setter dword - ColorMod _floorColor; // ? Entity_NPC::Constructor 006b8590 inits a ColorMod (1,1,1,1, 7 zeros); Update 006c4b30 samples the room render surface into it every 30 frames and Color::Lerp's the sprite toward it (0.1) - ColorMod _dirtColor; // Entity_NPC::UpdateDirtColor 006c04b0 writes Room::GetFloorColorAt*2 to this+0xcac..0xcb4 and lerps sprite layers toward it - ANM2 _statusEffectSprite; // Entity_NPC::Update 006c4b30 loads gfx/StatusEffects.anm2 into this+0xcd8 and plays the status animation; Render 006d2e50 draws it; constructor builds the ANM2 (0xd0c/0xd1c/0xde1/0xde8 are inside it) - ANM2 _chargeBarSprite; // gfx/chargebar.anm2 loaded by Entity_NPC::UpdateChargeBar (006d8e40) - uint8_t _hitList[0xc]; // std_vector_uint; Entity_NPC::HandleCollision 006cd410 (6cdfb3, 6cfdfa...) and NpcAI::ENTITY_DARK_ESAU 005542e0 pass this+0xf00 to EntityList::HitListContains 00431640 - uint8_t _secondaryHitList[0xc]; // std_vector_uint; Entity_NPC::Constructor/ClearReferences 006b8f30 manage a 3-dword vector 0xf0c..0xf14; NpcAI::ENTITY_WHIPPER 004e5170 clears it and binary-searches it for GetHitListIndex of whip-hit entities - uint32_t _aiCallFlags; // bitmask of extra AI calls: Update 006c4b30 calls the AI with phase 1 if &1, phase 4 if &8; HandleCollision 006cd410 phase 3 if &4; regen champion saves it <<16 and restores from 0xf1a - int32_t _controllerID; // Entity_NPC::IsControllerActionPressed 006d8260 passes this+0xf1c to input_is_action_pressed (-1 = none); GetControllerMovementInput 006d85a0 / UpdateControllerMovement 006d9050 test it - Vector _controllerMovement; // movement written by Entity_NPC::UpdateControllerMovement (006d9050); 21 AIs reset it each frame - uint32_t _aimTargetEffect; // void* // effect 1000.30 an NPC under player control aims at (Entity_NPC::GetAimTargetPosition 006d8d30) - uint8_t _pad_0xf2c[0x4]; - Vector _forwardVector; // Entity_NPC::GetForwardVector 006d48a0 (vtable 22) returns it when non-zero (else velocity dir); Gyro/Dust/Knight AIs set it; Init zeroes - uint8_t _forcedTarget[0x4]; // EntityPtr; Entity_NPC::TryForceTarget 006b9910 assigns the target (multiset erase/insert); TakeDamage 006d60a0 and many AIs test it - int _forcedTargetTimer; // Entity_NPC::TryForceTarget 006b9910 stores Duration (refuses when <0); Update 006c4b30 counts it down, bosses get -150 cooldown, releases _forcedTarget at 0 - uint32_t _sirenPlayerEntity; // Entity_Player* // NpcHelper::siren_charmed_count 0058e590 counts familiars whose _player (+0x410) == npc+0xf40; NpcAI::siren_release_stolen_items 005911b0 animates the collectible pickup on it - float _hitPointsMulti; // Entity_NPC::Morph 006c0f30 sets _maxHitPoints = 0xf44 * new maxHP; ENTITY_CAGE 004878a0 multiplies maxHP/HP of split children by the parent's; Init 1.0 - float _scaleMulti; // ENTITY_CAGE 004878a0 SetScale(child scale * parent 0xf48) and multiplies it; Init 1.0 - int _lastGridIndex; // Entity_NPC::Update 006c4b30 (brown champion) compares Room::GetGridIndex(_pos) with it, spawns poop at the old index, stores the new one; Init -1 - uint32_t _pickupGhostsEntity; // Entity_Effect* // Entity_NPC::UpdatePickupGhosts 006da530 passes/stores this+0xf50 through Entity_Effect::CreateLootPreview and removes it - uint8_t _pad_0xf54[0xc]; -}; -static_assert(offsetof(Entity_NPC, _damageEvents) == 0x8); -static_assert(offsetof(Entity_NPC, _pendingDamage) == 0x14); -static_assert(offsetof(Entity_NPC, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity_NPC, _index) == 0x20); -static_assert(offsetof(Entity_NPC, _collisionIndex) == 0x24); -static_assert(offsetof(Entity_NPC, _type) == 0x28); -static_assert(offsetof(Entity_NPC, _variant) == 0x2c); -static_assert(offsetof(Entity_NPC, _subtype) == 0x30); -static_assert(offsetof(Entity_NPC, _spawnerType) == 0x34); -static_assert(offsetof(Entity_NPC, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity_NPC, _sprite) == 0x48); -static_assert(offsetof(Entity_NPC, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity_NPC, _spriteScale) == 0xe4); -static_assert(offsetof(Entity_NPC, _isFlipX) == 0x148); -static_assert(offsetof(Entity_NPC, _shadowSize) == 0x15c); -static_assert(offsetof(Entity_NPC, _shadowOffset) == 0x160); -static_assert(offsetof(Entity_NPC, _flags) == 0x168); -static_assert(offsetof(Entity_NPC, _valid) == 0x170); -static_assert(offsetof(Entity_NPC, _visible) == 0x171); -static_assert(offsetof(Entity_NPC, _exists) == 0x172); -static_assert(offsetof(Entity_NPC, _dead) == 0x173); -static_assert(offsetof(Entity_NPC, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity_NPC, _isInterpolating) == 0x175); -static_assert(offsetof(Entity_NPC, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity_NPC, _removedByFactory) == 0x177); -static_assert(offsetof(Entity_NPC, _collisionPoints) == 0x178); -static_assert(offsetof(Entity_NPC, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity_NPC, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity_NPC, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity_NPC, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity_NPC, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity_NPC, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity_NPC, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity_NPC, _colorParams) == 0x1ac); -static_assert(offsetof(Entity_NPC, _color) == 0x1b8); -static_assert(offsetof(Entity_NPC, _splatColor) == 0x1e4); -static_assert(offsetof(Entity_NPC, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity_NPC, _damageCountdown) == 0x214); -static_assert(offsetof(Entity_NPC, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity_NPC, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity_NPC, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity_NPC, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity_NPC, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity_NPC, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity_NPC, _fearCountdown) == 0x230); -static_assert(offsetof(Entity_NPC, _burnCountdown) == 0x234); -static_assert(offsetof(Entity_NPC, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity_NPC, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity_NPC, _charmSource) == 0x240); -static_assert(offsetof(Entity_NPC, _entityRef2) == 0x268); -static_assert(offsetof(Entity_NPC, _entityRef3) == 0x290); -static_assert(offsetof(Entity_NPC, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity_NPC, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity_NPC, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity_NPC, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity_NPC, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity_NPC, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity_NPC, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity_NPC, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity_NPC, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity_NPC, _iceCountdown) == 0x300); -static_assert(offsetof(Entity_NPC, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity_NPC, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity_NPC, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity_NPC, _pausePosition) == 0x314); -static_assert(offsetof(Entity_NPC, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity_NPC, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity_NPC, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity_NPC, _spawnFrame) == 0x328); -static_assert(offsetof(Entity_NPC, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity_NPC, _config) == 0x330); -static_assert(offsetof(Entity_NPC, _targetPosition) == 0x334); -static_assert(offsetof(Entity_NPC, _pos) == 0x33c); -static_assert(offsetof(Entity_NPC, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity_NPC, _posOffset) == 0x34c); -static_assert(offsetof(Entity_NPC, _renderZOffset) == 0x354); -static_assert(offsetof(Entity_NPC, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity_NPC, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity_NPC, _velocity) == 0x360); -static_assert(offsetof(Entity_NPC, _baseFriction) == 0x368); -static_assert(offsetof(Entity_NPC, _friction) == 0x36c); -static_assert(offsetof(Entity_NPC, _size) == 0x370); -static_assert(offsetof(Entity_NPC, _sizeMulti) == 0x374); -static_assert(offsetof(Entity_NPC, _mass) == 0x37c); -static_assert(offsetof(Entity_NPC, _health) == 0x380); -static_assert(offsetof(Entity_NPC, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity_NPC, _collisionDamage) == 0x388); -static_assert(offsetof(Entity_NPC, _prevPosition) == 0x38c); -static_assert(offsetof(Entity_NPC, _prevVelocity) == 0x394); -static_assert(offsetof(Entity_NPC, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity_NPC, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity_NPC, _updateTime) == 0x3a4); -static_assert(offsetof(Entity_NPC, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity_NPC, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity_NPC, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity_NPC, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity_NPC, _parent) == 0x3bc); -static_assert(offsetof(Entity_NPC, _child) == 0x3c0); -static_assert(offsetof(Entity_NPC, _target) == 0x3c4); -static_assert(offsetof(Entity_NPC, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity_NPC, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity_NPC, _minecart) == 0x3d4); -static_assert(offsetof(Entity_NPC, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity_NPC, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity_NPC, _initSeed) == 0x3ec); -static_assert(offsetof(Entity_NPC, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity_NPC, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity_NPC, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity_NPC, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity_NPC, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity_NPC, _luaBridgeRef) == 0x408); -static_assert(offsetof(Entity_NPC, _stateFrame) == 0x410); -static_assert(offsetof(Entity_NPC, _pathfinder) == 0x414); -static_assert(offsetof(Entity_NPC, _state) == 0xb64); -static_assert(offsetof(Entity_NPC, _savedState) == 0xb68); -static_assert(offsetof(Entity_NPC, _aiCounter) == 0xb6c); -static_assert(offsetof(Entity_NPC, _appearFrames) == 0xb70); -static_assert(offsetof(Entity_NPC, _aiCallPhase) == 0xb74); -static_assert(offsetof(Entity_NPC, _collisionIsLow) == 0xb78); -static_assert(offsetof(Entity_NPC, _collisionEntity) == 0xb7c); -static_assert(offsetof(Entity_NPC, _collisionResult) == 0xb80); -static_assert(offsetof(Entity_NPC, _decoyTargetTimer) == 0xb84); -static_assert(offsetof(Entity_NPC, _killDamageEvents) == 0xb88); -static_assert(offsetof(Entity_NPC, _killDamage) == 0xb94); -static_assert(offsetof(Entity_NPC, _killDamageFlags) == 0xb98); -static_assert(offsetof(Entity_NPC, _projectileCooldown) == 0xba0); -static_assert(offsetof(Entity_NPC, _projectileDelay) == 0xba4); -static_assert(offsetof(Entity_NPC, _championTimer) == 0xba8); -static_assert(offsetof(Entity_NPC, _championSpeed) == 0xbac); -static_assert(offsetof(Entity_NPC, _v1) == 0xbb0); -static_assert(offsetof(Entity_NPC, _v2) == 0xbb8); -static_assert(offsetof(Entity_NPC, _i1) == 0xbc0); -static_assert(offsetof(Entity_NPC, _i2) == 0xbc4); -static_assert(offsetof(Entity_NPC, _deliriumBossType) == 0xbc8); -static_assert(offsetof(Entity_NPC, _deliriumBossVariant) == 0xbcc); -static_assert(offsetof(Entity_NPC, _deliriumTransformationTimer) == 0xbd0); -static_assert(offsetof(Entity_NPC, _deliriumRemainingAttacks) == 0xbd2); -static_assert(offsetof(Entity_NPC, _deliriumState) == 0xbd3); -static_assert(offsetof(Entity_NPC, _deliriumAttackID) == 0xbd8); -static_assert(offsetof(Entity_NPC, _deliriumAttackAngle) == 0xbdc); -static_assert(offsetof(Entity_NPC, _deliriumCycleID) == 0xbe0); -static_assert(offsetof(Entity_NPC, _deliriumCycleIDHigh) == 0xbe4); -static_assert(offsetof(Entity_NPC, _deliriumEntity) == 0xbe8); -static_assert(offsetof(Entity_NPC, _entityRef) == 0xbec); -static_assert(offsetof(Entity_NPC, _entityDeque) == 0xbf0); -static_assert(offsetof(Entity_NPC, _vectorDeque1) == 0xc04); -static_assert(offsetof(Entity_NPC, _vectorDeque2) == 0xc18); -static_assert(offsetof(Entity_NPC, _confusionTargetPos) == 0xc2c); -static_assert(offsetof(Entity_NPC, _aiFloat) == 0xc34); -static_assert(offsetof(Entity_NPC, _scale) == 0xc38); -static_assert(offsetof(Entity_NPC, _canShutDoors) == 0xc3c); -static_assert(offsetof(Entity_NPC, _isBoss) == 0xc3d); -static_assert(offsetof(Entity_NPC, _isUnreachableOnce) == 0xc3e); -static_assert(offsetof(Entity_NPC, _shieldStrength) == 0xc40); -static_assert(offsetof(Entity_NPC, _shieldFrames) == 0xc44); -static_assert(offsetof(Entity_NPC, _totalDamageTaken) == 0xc5c); -static_assert(offsetof(Entity_NPC, _isBestiaryEncountered) == 0xc60); -static_assert(offsetof(Entity_NPC, _isChampion) == 0xc63); -static_assert(offsetof(Entity_NPC, _championColorIdx) == 0xc64); -static_assert(offsetof(Entity_NPC, _flickerTimer) == 0xc68); -static_assert(offsetof(Entity_NPC, _flickerState) == 0xc6c); -static_assert(offsetof(Entity_NPC, _flickerAlpha) == 0xc70); -static_assert(offsetof(Entity_NPC, _championRegenTimer) == 0xc74); -static_assert(offsetof(Entity_NPC, _championRegenCount) == 0xc76); -static_assert(offsetof(Entity_NPC, _bosscoloridx) == 0xc78); -static_assert(offsetof(Entity_NPC, _groupIdx) == 0xc7c); -static_assert(offsetof(Entity_NPC, _floorColor) == 0xc80); -static_assert(offsetof(Entity_NPC, _dirtColor) == 0xcac); -static_assert(offsetof(Entity_NPC, _statusEffectSprite) == 0xcd8); -static_assert(offsetof(Entity_NPC, _chargeBarSprite) == 0xdec); -static_assert(offsetof(Entity_NPC, _hitList) == 0xf00); -static_assert(offsetof(Entity_NPC, _secondaryHitList) == 0xf0c); -static_assert(offsetof(Entity_NPC, _aiCallFlags) == 0xf18); -static_assert(offsetof(Entity_NPC, _controllerID) == 0xf1c); -static_assert(offsetof(Entity_NPC, _controllerMovement) == 0xf20); -static_assert(offsetof(Entity_NPC, _aimTargetEffect) == 0xf28); -static_assert(offsetof(Entity_NPC, _forwardVector) == 0xf30); -static_assert(offsetof(Entity_NPC, _forcedTarget) == 0xf38); -static_assert(offsetof(Entity_NPC, _forcedTargetTimer) == 0xf3c); -static_assert(offsetof(Entity_NPC, _sirenPlayerEntity) == 0xf40); -static_assert(offsetof(Entity_NPC, _hitPointsMulti) == 0xf44); -static_assert(offsetof(Entity_NPC, _scaleMulti) == 0xf48); -static_assert(offsetof(Entity_NPC, _lastGridIndex) == 0xf4c); -static_assert(offsetof(Entity_NPC, _pickupGhostsEntity) == 0xf50); -static_assert(sizeof(Entity_NPC) == 0xf60); - -struct Entity_Pickup { // : Entity (flattened) - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x4]; - ANM2 _priceANM2; // Entity_Pickup::update_price_sprite 006e2570 ANM2::Reset/Load (shop price sprite) on this+0x410; ctor 006e0010 constructs ANM2 there - int _charge; - int _optionsPickupIndex; - bool _isTouched; - uint8_t _pad_0x52d[0x1]; - bool _isForceBlind; // Entity_Pickup::SetForceBlind 006e1e60 stores the arg at this+0x52e and calls UpdateSprite when a collectible changes - bool _isPayToPlay; // Entity_Pickup::Init 006e02f0 sets it for chest variants 53/55/57/60 when someone has Pay To Play (380); HandleCollision/TryOpenChest then spend a coin instead of TryUseKey - int _itemPoolType; // ? Entity_Player::DropCollectible 00790530 copies History item +0x18 (REPENTOGON _itemPoolType) into it; HandleCollision passes it to SetQueuedItem as QueueItemData +0x10; Morph keeps it, ==3 with price 0 rerolls tag 0x200000000 items - int _price; - bool _isAutoUpdatePrice; - uint8_t _pad_0x539[0x3]; - int _shopItemId; - int _timeout; - int _wait; // Entity_Pickup::Init 006e02f0 zeroes it then sets 20 for variant 100 (collectible); Update 006e3940 decrements while >0 (Eternal Chest reclose sets 30); HandleCollision 006e8ae0 takes a collectible only at <1 and sets 20 on a restocked shop item - int _chestReCloseTimer; // Entity_Pickup::TryOpenChest 006e6e40 sets 60; Update 006e3940 decrements and at 0 an Eternal Chest (53) plays "Close" and gets subtype 1; CanFlip checks it - int _collisionCooldown; // Entity_Pickup::HandleCollision 006e8ae0: player touch while >0 just refreshes it to 10 and returns; Update decrements; Player::DropTrinket sets 4, TakeDamage zeroes - int _gridRepositionState; // ? Entity_Pickup::HandleCollision 006e8ae0 sets 1 after a pedestal swap near a room grid entity (<70px); Update 006e3940 1: scans grids -> 2; 2: TargetPosition = pos, -> 0 - int _dropDelay; // Entity_Pickup::Update 006e3940 starts: if this+0x554>0 decrement and skip the update; Entity_Player::AddCollectible staggers spawned pickups via +0x554 - ColorMod _colorMod; // ? ctor 006e0010 sets +0x558..+0x564 = 1.0 (tint) and +0x568..+0x580 = 0 (colorize/offset), Init 006e02f0 assigns a ColorMod to it as one block (ends right before State 0x584) - uint32_t _state; // Lua EntityPickup.State via binder 00884ea0: getter 008bedb0 dword via FUN_0085bff0 (unsigned pushinteger), setter dword - int _coopDuplicateIndex; // Entity_Pickup::HandleCollision 006e8ae0: in co-op, while +1 < alive players spawns another collectible and calls setter 006e2ff0(this+0x588 +1), -1 = none; Room::SpawnClearAward sets 0; Init -1 - uint8_t _unkEntityRef[0x4]; // EntityPtr; ? Entity_Pickup::ClearReferences 006ee130 resets it like the other EntityPtrs (multiset erase); ctor zeroes; no setter found - uint32_t _pickupGhost; // Entity_Effect* // Entity_Pickup::UpdateLootPreview 006e17c0 (Guppys Eye) stores Entity_Effect::CreateLootPreview result at this+0x590 and removes it - uint32_t _megaChestCollectible[2]; // Entity_Pickup* // Entity_Pickup::SetAlternatePedestal 006e1a80 links two pedestals at the same position (types 14/19) via this+0x594 / other+0x598 - int _varData; // Entity_Player::DropCollectible 00790530 copies the active slot _varData (player+0x1580+i*0x20+0x1c) into pickup+0x59c next to _charge (+0x524); Morph 006e30a0 zeroes it - uint32_t _cycleCollectibleList[8]; // Entity_Pickup::TryFlip 006e1640 rebuilds the cycle list: this[+0x5a0 + count*4] = id, count at +0x5c0 - uint32_t _cycleCollectibleCount; // Entity_Pickup::TryFlip 006e1640 zeroes and increments this+0x5c0 while filling +0x5a0[] - int _invisibleFrames; // Entity_Pickup::Update 006e3940: while invisible with collision, ++ and after 3 frames sets _visible; Init/Morph zero it - uint8_t _flipSaveState[0x8]; // KAGE_SmartPointer_EntitySaveState; Entity_Pickup::TryFlip 006e1640 requires this+0x5c8 != 0 and swaps the pedestal with that save state; ctor zeroes +0x5c8/+0x5cc (smart pointer) - ANM2 _altPedestalANM2; // Entity_Pickup::Update 006e3940: when +0x5c8 set and a player has Flip (711), copies the main sprite into this+0x5d0 and load_collectible_gfx of the flip item (the ghost item sprite); ANM2::Reset otherwise - uint8_t _pad_0x6e4[0xc]; -}; -static_assert(offsetof(Entity_Pickup, _damageEvents) == 0x8); -static_assert(offsetof(Entity_Pickup, _pendingDamage) == 0x14); -static_assert(offsetof(Entity_Pickup, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity_Pickup, _index) == 0x20); -static_assert(offsetof(Entity_Pickup, _collisionIndex) == 0x24); -static_assert(offsetof(Entity_Pickup, _type) == 0x28); -static_assert(offsetof(Entity_Pickup, _variant) == 0x2c); -static_assert(offsetof(Entity_Pickup, _subtype) == 0x30); -static_assert(offsetof(Entity_Pickup, _spawnerType) == 0x34); -static_assert(offsetof(Entity_Pickup, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity_Pickup, _sprite) == 0x48); -static_assert(offsetof(Entity_Pickup, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity_Pickup, _spriteScale) == 0xe4); -static_assert(offsetof(Entity_Pickup, _isFlipX) == 0x148); -static_assert(offsetof(Entity_Pickup, _shadowSize) == 0x15c); -static_assert(offsetof(Entity_Pickup, _shadowOffset) == 0x160); -static_assert(offsetof(Entity_Pickup, _flags) == 0x168); -static_assert(offsetof(Entity_Pickup, _valid) == 0x170); -static_assert(offsetof(Entity_Pickup, _visible) == 0x171); -static_assert(offsetof(Entity_Pickup, _exists) == 0x172); -static_assert(offsetof(Entity_Pickup, _dead) == 0x173); -static_assert(offsetof(Entity_Pickup, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity_Pickup, _isInterpolating) == 0x175); -static_assert(offsetof(Entity_Pickup, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity_Pickup, _removedByFactory) == 0x177); -static_assert(offsetof(Entity_Pickup, _collisionPoints) == 0x178); -static_assert(offsetof(Entity_Pickup, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity_Pickup, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity_Pickup, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity_Pickup, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity_Pickup, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity_Pickup, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity_Pickup, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity_Pickup, _colorParams) == 0x1ac); -static_assert(offsetof(Entity_Pickup, _color) == 0x1b8); -static_assert(offsetof(Entity_Pickup, _splatColor) == 0x1e4); -static_assert(offsetof(Entity_Pickup, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity_Pickup, _damageCountdown) == 0x214); -static_assert(offsetof(Entity_Pickup, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity_Pickup, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity_Pickup, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity_Pickup, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity_Pickup, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity_Pickup, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity_Pickup, _fearCountdown) == 0x230); -static_assert(offsetof(Entity_Pickup, _burnCountdown) == 0x234); -static_assert(offsetof(Entity_Pickup, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity_Pickup, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity_Pickup, _charmSource) == 0x240); -static_assert(offsetof(Entity_Pickup, _entityRef2) == 0x268); -static_assert(offsetof(Entity_Pickup, _entityRef3) == 0x290); -static_assert(offsetof(Entity_Pickup, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity_Pickup, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity_Pickup, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity_Pickup, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity_Pickup, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity_Pickup, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity_Pickup, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity_Pickup, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity_Pickup, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity_Pickup, _iceCountdown) == 0x300); -static_assert(offsetof(Entity_Pickup, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity_Pickup, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity_Pickup, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity_Pickup, _pausePosition) == 0x314); -static_assert(offsetof(Entity_Pickup, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity_Pickup, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity_Pickup, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity_Pickup, _spawnFrame) == 0x328); -static_assert(offsetof(Entity_Pickup, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity_Pickup, _config) == 0x330); -static_assert(offsetof(Entity_Pickup, _targetPosition) == 0x334); -static_assert(offsetof(Entity_Pickup, _pos) == 0x33c); -static_assert(offsetof(Entity_Pickup, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity_Pickup, _posOffset) == 0x34c); -static_assert(offsetof(Entity_Pickup, _renderZOffset) == 0x354); -static_assert(offsetof(Entity_Pickup, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity_Pickup, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity_Pickup, _velocity) == 0x360); -static_assert(offsetof(Entity_Pickup, _baseFriction) == 0x368); -static_assert(offsetof(Entity_Pickup, _friction) == 0x36c); -static_assert(offsetof(Entity_Pickup, _size) == 0x370); -static_assert(offsetof(Entity_Pickup, _sizeMulti) == 0x374); -static_assert(offsetof(Entity_Pickup, _mass) == 0x37c); -static_assert(offsetof(Entity_Pickup, _health) == 0x380); -static_assert(offsetof(Entity_Pickup, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity_Pickup, _collisionDamage) == 0x388); -static_assert(offsetof(Entity_Pickup, _prevPosition) == 0x38c); -static_assert(offsetof(Entity_Pickup, _prevVelocity) == 0x394); -static_assert(offsetof(Entity_Pickup, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity_Pickup, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity_Pickup, _updateTime) == 0x3a4); -static_assert(offsetof(Entity_Pickup, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity_Pickup, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity_Pickup, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity_Pickup, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity_Pickup, _parent) == 0x3bc); -static_assert(offsetof(Entity_Pickup, _child) == 0x3c0); -static_assert(offsetof(Entity_Pickup, _target) == 0x3c4); -static_assert(offsetof(Entity_Pickup, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity_Pickup, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity_Pickup, _minecart) == 0x3d4); -static_assert(offsetof(Entity_Pickup, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity_Pickup, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity_Pickup, _initSeed) == 0x3ec); -static_assert(offsetof(Entity_Pickup, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity_Pickup, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity_Pickup, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity_Pickup, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity_Pickup, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity_Pickup, _luaBridgeRef) == 0x408); -static_assert(offsetof(Entity_Pickup, _priceANM2) == 0x410); -static_assert(offsetof(Entity_Pickup, _charge) == 0x524); -static_assert(offsetof(Entity_Pickup, _optionsPickupIndex) == 0x528); -static_assert(offsetof(Entity_Pickup, _isTouched) == 0x52c); -static_assert(offsetof(Entity_Pickup, _isForceBlind) == 0x52e); -static_assert(offsetof(Entity_Pickup, _isPayToPlay) == 0x52f); -static_assert(offsetof(Entity_Pickup, _itemPoolType) == 0x530); -static_assert(offsetof(Entity_Pickup, _price) == 0x534); -static_assert(offsetof(Entity_Pickup, _isAutoUpdatePrice) == 0x538); -static_assert(offsetof(Entity_Pickup, _shopItemId) == 0x53c); -static_assert(offsetof(Entity_Pickup, _timeout) == 0x540); -static_assert(offsetof(Entity_Pickup, _wait) == 0x544); -static_assert(offsetof(Entity_Pickup, _chestReCloseTimer) == 0x548); -static_assert(offsetof(Entity_Pickup, _collisionCooldown) == 0x54c); -static_assert(offsetof(Entity_Pickup, _gridRepositionState) == 0x550); -static_assert(offsetof(Entity_Pickup, _dropDelay) == 0x554); -static_assert(offsetof(Entity_Pickup, _colorMod) == 0x558); -static_assert(offsetof(Entity_Pickup, _state) == 0x584); -static_assert(offsetof(Entity_Pickup, _coopDuplicateIndex) == 0x588); -static_assert(offsetof(Entity_Pickup, _unkEntityRef) == 0x58c); -static_assert(offsetof(Entity_Pickup, _pickupGhost) == 0x590); -static_assert(offsetof(Entity_Pickup, _megaChestCollectible) == 0x594); -static_assert(offsetof(Entity_Pickup, _varData) == 0x59c); -static_assert(offsetof(Entity_Pickup, _cycleCollectibleList) == 0x5a0); -static_assert(offsetof(Entity_Pickup, _cycleCollectibleCount) == 0x5c0); -static_assert(offsetof(Entity_Pickup, _invisibleFrames) == 0x5c4); -static_assert(offsetof(Entity_Pickup, _flipSaveState) == 0x5c8); -static_assert(offsetof(Entity_Pickup, _altPedestalANM2) == 0x5d0); -static_assert(sizeof(Entity_Pickup) == 0x6f0); - -struct History { - uint8_t _historyItems[0xc]; // vector_HistoryItem; Entity_Player::RemoveCollectibleByHistoryIndex 0078fec0 / DropCollectible index begin 0x1dec / end 0x1df0 with stride 0x1c - bool _isLocked; // Entity_Player::RemoveCollectibleByHistoryIndex 0078fec0 / reroll_collectibles_on_damage 005c88a0 set player+0x1df8 (History 0x1dec +0xc) to 1 around RemoveCollectible and restore it so no history entry is touched - uint8_t _pad_0xd[0x3]; - uint32_t _player; // Entity_Player* // Entity_Player ctor 00753da0 writes this into 0x1dfc (History 0x1dec +0x10) -}; -static_assert(offsetof(History, _historyItems) == 0x0); -static_assert(offsetof(History, _isLocked) == 0xc); -static_assert(offsetof(History, _player) == 0x10); - -struct QueueItemData { - uint32_t _item; // ItemConfig_Item* - int _charge; - uint8_t _flags; // Lua QueueItemData.Touched 007538f0 returns byte+8 & 1; GetTrinketMultiplier 007cb6e0 / replace_trinket test bit 2 (golden queued trinket); ClearQueueItem zeroes the byte - uint8_t _pad_0x9[0x3]; -}; -static_assert(offsetof(QueueItemData, _item) == 0x0); -static_assert(offsetof(QueueItemData, _charge) == 0x4); -static_assert(offsetof(QueueItemData, _flags) == 0x8); - -struct PlayerCostumeMap { - int _index; // ClearCollectibleAnim 007ad5a0: -1 = none, else index into Entity_Player::_costumeSpriteDescs (stride 0x130) - int _layerID; // Entity_Player::RenderGlow 0078dc60 passes Entity_Player+0x1230 (entry 0 +4) as the layer id to ANM2::GetLayer / Sprite::RenderLayer of costume desc[_index]; UpdateCostumes 0075bf00 stores the matched LayerState->_layerData id (-1 when none) at 0x1230+i*0x10; ClearCostumes 0075dfe0 sets -1 - int _priority; // Entity_Player::UpdateCostumes 0075bf00 skips a costume layer when CostumeSpriteDesc+0x118 priority < 0x1234+i*0x10, else copies that priority in (init -1); ClearCostumes 0075dfe0 sets 0 - bool _isBodyLayer; // Update 00782af0 layer loop over Entity_Player+0x1238 stride 0x10: 0 -> head-style scale/offset (0x1500), else body scale only; UpdateCostumes 0075bf00 sets it for layers 1, 2, 3, 11 (body, body0, body1, top0) only - uint8_t _pad_0xd[0x3]; -}; -static_assert(offsetof(PlayerCostumeMap, _index) == 0x0); -static_assert(offsetof(PlayerCostumeMap, _layerID) == 0x4); -static_assert(offsetof(PlayerCostumeMap, _priority) == 0x8); -static_assert(offsetof(PlayerCostumeMap, _isBodyLayer) == 0xc); - -struct TemporaryEffects { - uint32_t _cacheFlags; // new vs REPENTOGON: 00930220 AddEffect / 009303f0 RemoveEffect OR ItemConfig_Item cacheFlags (+0x54) into *this - uint8_t _effects[0xc]; // vector_TemporaryEffect; 007537a0 Lua GetEffectsList returns this+4; 00930220 AddEffect/009303f0 RemoveEffect walk this[1]..this[2] stride 0x10, push/erase - bool _shouldEvaluateCache; // 00930220 AddEffect / 009303f0 RemoveEffect / 009306c0 ClearEffects set byte this+0x10 = 1 after any change - bool _disabled; // 00930220 AddEffect, 009303f0 RemoveEffect, 00930680 HasNullEffect, 009306c0 ClearEffects all bail out if byte this+0x11 != 0 - uint8_t _pad_0x12[0x2]; - uint32_t _player; // Entity_Player* // 00930220 AddEffect: Entity_Player::AddCostume(this[5],...) ; RemoveEffect: this[5]==0 -> Room::TriggerEffectRemoved else Entity_Player::trigger_collectible_effect_removed -}; -static_assert(offsetof(TemporaryEffects, _cacheFlags) == 0x0); -static_assert(offsetof(TemporaryEffects, _effects) == 0x4); -static_assert(offsetof(TemporaryEffects, _shouldEvaluateCache) == 0x10); -static_assert(offsetof(TemporaryEffects, _disabled) == 0x11); -static_assert(offsetof(TemporaryEffects, _player) == 0x14); - -struct PlayerProceduralItems { - uint32_t _player; // Entity_Player* // Entity_Player::Init 00755470 (007575bb) stores the player at Entity_Player+0x1fc8 (= _proceduralItems+0) - uint8_t _itemIds[0x8]; // std_set_int; Entity_Player::TryRemoveTrinket 00771f60 walks the tree at Entity_Player+0x1fcc for negative (glitched) ids indexing ProceduralItemManager _proceduralItems; ctor 00753da0 builds the head -}; -static_assert(offsetof(PlayerProceduralItems, _player) == 0x0); -static_assert(offsetof(PlayerProceduralItems, _itemIds) == 0x4); - -struct Entity_Player { // : Entity (flattened) - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x4]; - bool _isControlsEnabled; - uint8_t _pad_0x411[0x3]; - int _controlsCooldown; - int _fireBlockCooldown; // Update 00782af0 counts it down beside _controlsCooldown; update_shooting 0077b020 sets it after a Maw of the Void / Revelation release and blocks firing while >0 - ANM2 _bodySprite; // ctor 00753da0 builds ANM2 here first; Render 0078b640 checks its _loaded and reads its null frame for the held item - ANM2 _crownOfLightSprite; // ctor 00753da0 ANM2 ctor; TriggerNewRoom_TemporaryEffects 007a8350 / UpdateHeartDependentEffects play "FloatGlow"/"FloatNoGlow" on it next to Crown of Light (415) effect add/remove; Update ANM2::Update - ANM2 _darkPrincesCrownSprite; // ctor 00753da0 ANM2 ctor; TriggerNewRoom_TemporaryEffects 007a8350 / UpdateHeartDependentEffects play "FloatGlow" on it with Dark Prince's Crown (442) effect; Update ANM2::Update - ANM2 _chargeBarSprites[7]; // ctor 00753da0 _eh_vector_constructor_iterator_(0x758, 0x114, 7, ANM2 ctor); FUN_0075ea40 sets bar percent on 0x758 (weapon charge / Bag of Crafting), 0xcbc, 0xdd0 (Sumptorium); Update updates all 7 - ANM2 _bloodGushSprite; // ctor 00753da0 builds ANM2 here after the 7-sprite array at 0x758; Update 00782af0 ANM2::Update on it; same layout as REPENTOGON (shift 0 up to 0x1368) - ANM2 _heldSprite; // ctor 00753da0 ANM2; AnimateCollectible 007ab380 loads the item graphic into it, rewinds and plays it - ANM2 _statusEffectSprite; // ctor 00753da0 ANM2 ctor; Update 00782af0 loads "gfx/StatusEffects.anm2" into it and plays "Charm"...; Render 0078ca00 draws it above the head (-35 * spriteScale.y) - uint8_t _costumeSpriteDescs[0xc]; // vector_CostumeSpriteDesc; ctor 00753da0 zeroes a 3-dword vector at 0x1220..0x1228 right after the ANM2 at 0x110c; shift-0 region bracketed by 0xff8 and 0x1340 - PlayerCostumeMap _playerCostumeMap[15]; // Update 00782af0 walks this+0x1238 (+0xc _isBodyLayer) stride 0x10 for 15 layers; entry 4 index 0x126c: Update/trigger_collectible_effect_removed 00793970 (Mega Mush 625) index*0x130 + _costumeSpriteDescs, -1 = none - uint8_t _pad_0x131c[0x4]; - uint8_t _headAnim[0x18]; // std_string; ctor 00753da0 inits an MSVC std::string at 0x1320 (size 0x1330=0, cap 0x1334=0xf); shift-0 region - int _blinkTime; // Lua field HeadFrameDelay = +0x1338; update_shooting 0077b020 sets 8/10 and counts it down - int _headDirectionTime; // update_shooting 0077b020 counts it down beside 0x1338 and only refocuses the head while it is <0; bracketed by 0x1338 and 0x1340 (shift 0) - int _maxHearts; - int _redHearts; // Lua EntityPlayer:GetHearts 00428b10 returns this+0x1344; AddHearts 00758a70 / AddMaxHearts 007588a0 clamp and add to it - int _eternalHearts; - int _soulHearts; - int _blackHearts; - int _jarHearts; - int _jarFlies; - int _numKeys; - bool _hasGoldenKey; - bool _hasGoldenBomb; - uint8_t _pad_0x1362[0x2]; - int _numBombs; - int _numCoins; - int _numBlueFlies; - int _numBlueSpiders; - int _gnawedLeafTimer; // Update 00782af0: HasCollectible(210 Gnawed Leaf) with no action triggers -> ++, >60 adds the null costume; reset to 0 otherwise - int _lastActionTriggers; - short _bloodLustCounter; // EvaluateItems 00763570 reads it as short beside GetCollectibleEffectNum(411 Blood Lust); TakeDamage 007729d0 increments it - short _deadCatLives; // GetExtraLives 007bf670 adds it to the 1up/... counts; TriggerDeath 007a1090 decrements it and removes Dead Cat (81) copies above lives*9-8; TriggerCollectibleRemoved 0078ff90 clamps it to 9*GetCollectibleNum(81) - short _tonsilCounter; // TakeDamage 007729d0 with Tonsil (trinket 97) decrements it and at <1 spawns a tonsil; FUN_007d9ca0 rerolls it to 6 + rand%7 from the trinket RNG; Store/RestoreGameState save it as short - short _tonsilCount; // TakeDamage 007729d0: ++ (cache 0x200 familiars) while < multiplier+1, then TryRemoveTrinket(97 Tonsil) - short _numLeprosy; // AddLeprosy 00759b90: ++ while <3, cache 0x200; EvaluateItems CheckFamiliar(0x79 Leprosy, it) - uint8_t _pad_0x1386[0x2]; - int _metronomeCollectibleID; // UseActiveItem 005b39d0 Metronome case stores the rolled item id; GetCollectibleNum 00770ca0 +1 when HasCollectibleEffect(488) and id matches; room_exit 007a6680 clears it - int _bleedOutHealth; // TakeDamage 007729d0 sets 600 with Shard of Glass (448) under FLAG_BLEED_OUT self-bleed; Update 00782af0 subtracts GetHitPointsLost, at <1 deals damage and resets 600, tints <150, clears the flag+0 when healed; AddHearts/AddRottenHearts zero it - int _threeDollarBillItem; // HasCollectible 007706e0 / GetCollectibleNum 00770ca0: with 3 Dollar Bill (191) the id stored here counts as owned - int _monkeyPawCounter; // TakeDamage 007729d0 decrements it, at <1 TryRemoveTrinket(20 Monkey Paw) and resets to 3 - bool _isPlayingExtraAnimation; // PlayExtraAnimation 007abe20 (Lua) sets 1; IsExtraAnimationFinished 007ab110 returns !0x1398 && !0x139a; Update 00782af0 clears it when the animation finishes - bool _isHurtPending; // TakeDamage 007729d0 sets 1 at the end; Update 00782af0 clears it once no item anim (0x1398) and rolls Intruder (575) spider burst - bool _isPlayingItemAnimation; // PlayExtraAnimation 007abe90 (the anm2-swap variant used by AnimatePickup/Collectible) sets 1 and 0x1398=0; IsExtraAnimationFinished 007ab110 tests it - uint8_t _pad_0x139b[0x1]; - uint8_t _queuedExtraAnimation[0x18]; // std_string; ctor 00753da0 inits an MSVC std::string at 0x139c (size 0x13ac=0, cap 0x13b0=0xf); dtor 00754ed0 frees it beside _name/_headAnim; AddCollectible 0075f0e0 (007629bf) assigns "Glitch" to it; Update 00782af0 (007891d1): if not empty and IsExtraAnimationFinished, PlayExtraAnimation(c_str) and clear it - uint8_t _holyMantleState; // TakeDamage 007729d0: with Holy Mantle (313) and 0 -> set 1 (shield consumed) else remove null 0x2e; room_exit 007a6680 clears; TriggerNewRoom_TemporaryEffects 007a8350 x = x>1; Restore sets 0/2 - uint8_t _pad_0x13b5[0x1]; - bool _isBrokenRemotePending; // ControlActiveItem sets it when slot 0 is used with Broken Remote (trinket 4); Update 00782af0 then uses Teleport (44) or Teleport 2.0 (419) and clears it with 0x13b8 - uint8_t _pad_0x13b7[0x1]; - int _cursedPennyPending; // ? Update 00782af0 rolls Cursed Penny (trinket 172) teleports with GetTrinketMultiplier when it is non-zero (1 = rand 100 ...), cleared next to 0x13b6; set by Entity_Pickup::HandleCollision 006e8ae0 - int _damageCooldown; - int _playerType; - uint8_t _name[0x18]; // std_string; Lua EntityPlayer:GetName 007e9280 returns this+0x13c4 (SSO, cap 0x13d8); RestoreGameState 007ae4b0 assigns EntityConfig_Player::GetDisplayName; AddCollectible logs it - uint32_t _weapons[5]; // Weapon* // release_weapons_and_effects 00757ac0 destroys 0x13e0..0x13ec (vtable+0x14 then deleting dtor) and 0x13dc; FUN_0075ea40 reads charge via vtable+0x1c of 0x13e0..; FUN_0042bca0 creates 0x13e0 (REPENTOGON 0x13d8) - uint8_t _pad_0x13f0[0x1c]; - uint32_t _markedTarget; // Entity_Effect* // Entity_Familiar::TryAimAtMarkedTarget 006146e0 reads player+0x140c; GetTearMovementInheritance 007aaea0 tests HasCollectible(394 Marked) && it; release_weapons_and_effects 00757ac0 Removes it - uint32_t _heldEntity; // Entity* // ThrowHeldEntity 007d2470 (Lua) clears &this+0x1410; Render 0078ca00 draws the held entity's sprite (+0x48); TrapDoor/Stairs Update compare it with _twinPlayer 0x1e68 (Forgotten carrying the Soul) - bool _isHeldEntityVisible; // TryHoldEntity 007d2170 saves the picked-up entity's _visible here; ThrowHeldEntity 007d2470 restores it onto _heldEntity (0x1410) - uint8_t _pad_0x1415[0x3]; - int _heldEntityGridCollisionClass; // TryHoldEntity 007d2170 saves the held entity's _entityGridCollisionClass (+0x184); ThrowHeldEntity 007d2470 writes it back to held+0x184 - int _heldEntityCollisionClass; // TryHoldEntity 007d2170 saves the held entity's _entityCollisionClass (+0x188); ThrowHeldEntity 007d2470 writes it back to held+0x188 - uint8_t _pad_0x1420[0x10]; - int _tractorBeam; - uint8_t _pad_0x1434[0x10]; - uint8_t _breathOfLifeEffect[0x14]; // EntityPtr; ? release_weapons_and_effects 00757ac0 removes (vtable +0x28) and unregisters it like the 0x1420..0x144c EntityPtr run; update_effects 00794e50 releases it when the Breath of Life (326) effect is gone; ControlActiveItem drops it on re-trigger - uint32_t _megaBlastLaser; // Entity_Laser* // update_effects 00794e50: while _megaBlastDuration 0x18f4 > 15 and this is null, ShootAngle laser with timeout duration-15 and SetReference here; release_weapons_and_effects 00757ac0 Removes it - int _rUaWizardTimer; // UsePill 007c4180 R U A Wizard case adds 900 (1800 horse pill); update_effects 00794e50 counts down; Weapon_Bone/SpiritSword::Fire test >0; Store/RestoreGameState slot 0x82 - float _maxfiredelay; - float _shotspeed; - uint8_t _pad_0x1468[0x4]; - int _firedTearCount; // FireTear 00790af0: tear->_tearIdx = this+0x146c, then increments it (running per-player tear index) - float _damage; - float _tearheight; - float _tearfallspeed; // Lua field EntityPlayer.TearFallingSpeed = +0x1478; FireTear 00790af0 uses -it as tear falling speed - float _tearfallaccel; // Lua field EntityPlayer.TearFallingAcceleration = +0x147c; FireTear 00790af0 copies it to the tear's _fallingAccel - float _tearrange; - uint8_t _pad_0x1484[0x4]; - BitSet128 _tearFlags; // Lua EntityPlayer.TearFlags via binder 00883ab0: getter 008be780 UserdataValue 16-byte copy - ColorMod _tearColor; // Lua EntityPlayer.TearColor via binder 00883c30: getter 008be8a0 -> 008ab7d0 UserdataValue, setter 008be900 copies 0x2c bytes - ColorMod _laserColor; - Vector _playerSpriteScale; // Lua EntityPlayer.SpriteScale getter 0060d0a0 returns this+0x14f0/0x14f4; Update 00782af0 Sprite::SetScale(&this+0x14f0); Store/RestoreGameState save it - Vector _bodyScale; // ? Render 0078b640 scales layers whose _playerCostumeMap[i]._isBodyLayer is set by this vector (0x1500 for the others); Update 00782af0 assigns it as body layer scale; saved in GameStatePlayer - Vector _headScale; // ? Render 0078b640 scales non-body layers' pos/size by it; Update 00782af0 offsets head layers by (0x1504-0x14fc)*2.5; saved in GameStatePlayer next to 0x14f8 - TemporaryEffects _temporaryeffects; // Lua EntityPlayer:GetEffects 004361c0 returns this+0x1508; 120+ callers pass it to TemporaryEffects::Has/AddCollectibleEffect - int _speedModifier; // EvaluateItems 00763570 movespeed = (it + ...)*0.2 + ... (0 under Curse Mist/coop ghost); reroll_collectibles_on_damage 005c88a0 randomises it -1..1; Store/RestoreGameState slot 0x12 - int _fireDelayModifier; // EvaluateItems 00763570 fire-delay block reads it (0 under Curse Mist/coop ghost); reroll_collectibles_on_damage 005c88a0 randomises it -1..1 beside 0x1520/0x1528; Store/RestoreGameState slot 0x13 - int _damageModifier; // EvaluateItems 00763570 damage += it (0 under Curse Mist/coop ghost); reroll_collectibles_on_damage 005c88a0 randomises it -1..1; Store/RestoreGameState slot 0x14 - int _tearRangeModifier; - int _shotSpeedModifier; // EvaluateItems 00763570 shot-speed block: shotspeed = (this+0x1530 + ...)*0.2 + ...; zeroed under Curse Mist/coop ghost like the kept 0x1520..0x152c modifiers (shift +8) - int _luckModifier; // EvaluateItems 00763570 luck block (cache 0x400) adds it, zeroed under Curse Mist/coop ghost (shift +8) - int _donateLuck; // DonateLuck 007b2200 (Lua EntityPlayer:DonateLuck) adds the argument here and sets cache flag 0x400; EvaluateItems adds it to luck - int _potatoPeelerCounter; // EvaluateItems 00763570: damage += (0x153c+0x1540)*0.2 and Cube of Meat level = 0x153c + GetCollectibleNum(73) + effect num(73) (shift +8) - int _potatoPeelerBandageCounter; // Entity_Player::UseActiveItem 005b39d0 (Potato Peeler case) increments it instead of _potatoPeelerCounter when the player has Ball of Bandages (207) but no Cube of Meat (73); EvaluateItems 00763570 adds it to damage *0.2 and to the Ball of Bandages level (+ GetCollectibleNum(207) + effect num); RestoreGameState 007ae4b0 restores it - short _greedsGulletHearts; // Game::render_debug_player_info 007cfba0 prints "Greed's Gullet: %d (overflow:%d)" from shorts 0x1544/0x1546; update_greeds_gullet 007ce420 compares GetGreedsGulletHearts with it - short _greedsGulletOverflow; // render_debug_player_info 007cfba0 prints it as the overflow; update_greeds_gullet 007ce420 adds it to the heart cap and writes it back - short _greedsGulletRedHearts; // ? update_greeds_gullet 007ce420: when GetGreedsGulletHearts grew past it, adds red hearts and stores the new value here - bool _isUpdatingGreedsGullet; // update_greeds_gullet 007ce420 returns if set, sets 1 on both twins, clears at the end; AddSoulHearts 00758d00 skips its extra handling while set - uint8_t _pad_0x154b[0x1]; - float _edenSpeed; // EvaluateItems 00763570 speed block (cache 0x10) writes it into the per-player-type base speed table at Eden (9) and Tainted Eden (0x1e) slots - float _edenFireDelay; // EvaluateItems 00763570 fire-delay block (cache 2) adds it when playerType is 9/0x1e (shift +0xc) - float _edenDamage; // EvaluateItems 00763570 damage block adds it when playerType is 9/0x1e (shift +0xc) - float _edenTearRange; // EvaluateItems 00763570 range block (beside the -80/-60 per-character range) adds it when playerType is 9/0x1e - float _edenShotSpeed; // EvaluateItems 00763570 shot-speed block: shotspeed += it when playerType is 9/0x1e - float _edenLuck; // EvaluateItems 00763570 luck block (cache 0x400) sums it with the luck modifiers; last of the 6-float Eden block 0x154c..0x1560, right before kept _movespeed 0x1568 - float _taurusSpeedBonus; // Entity_Player::update_effects 00794e50 (79681f) adds a constant to it while the Taurus (299) effect is active and sets cache flags 0x1010, zeroes it when the effect is gone; EvaluateItems 00763570 adds it to _movespeed with the Taurus effect; TriggerNewRoom_TemporaryEffects 007a8350 zeroes it - float _movespeed; - float _luck; - bool _canFly; - uint8_t _pad_0x1571[0x3]; - uint32_t _cacheFlags; // AddCacheFlags 00436160 (ZHL exact, Lua) ORs flags into this+0x1574; AddDeadEyeCharge 007c78b0 sets bit 1 before EvaluateItems - int8_t _tearDisplacement; // FireTear 00790af0 / FireBomb 007a0970 offset the shot by (char)it; Weapon_Bone::Fire negates it per shot (alternating eye); init_player_type_state 007cc200 swaps it with the sub player - uint8_t _pad_0x1579[0x3]; - float _meleeDamage; // EvaluateItems' damage before weapon multipliers; the hug's 2x base (characters_9.md) - ActiveItemDesc _activeDesc[4]; // ctor 00753da0 zeroes 4 x 0x20 bytes at 0x1580; GetCollectibleNum 00770ca0 counts ids at 0x1580/0x15a0/0x15c0/0x15e0 (stride 0x20, REPENTOGON 0x1574 x 0x1c) - int _itemState; - int _itemStateCooldown; // ControlActiveItem 00791a40 tests it with _itemState; update_shooting 0077b020 counts it; SwapActiveItems/room_exit/active_used_post zero it - uint32_t _vampireCharmKills; // FUN_007d3350: with HasCollectible(62 Charm of the Vampire) ++ per kill, at >= 13 (8 in co-op) AddHearts(1) and subtracts 13; Store/RestoreGameState slot 0x21 - uint8_t _pad_0x160c[0x4]; - int _bombPlaceDelay; // update_bomb_input 00780f40: bombs placed only while <1, then set to 30 (1 with 517 Fast Bombs, 15 in some co-op mode) - int _forgottenSwapFormCooldown; // init_player_type_state 007cc200: The Forgotten/Soul (types 16/17) swap refused while >0, else set to 15; pockets_rotate 007a42b0 counts it down - int _controllerIndex; - int _playerIndex; // Lua EntityPlayer:IsSubPlayer 00753ac0 returns it >>31 (index < 0); ctor 00753da0 inits -1; ConsumableCountChanged 007597e0 only when >= 0; EntityList/GetNearestTargetPlayer order players by it with -1 skipped - int _glowingHourglassIndex; // ? ctor 00753da0 inits -1; UseActiveItem 005b39d0 / UseCard index GlowingHourglassState (+0x19d80 + it*0x5dc) with it when >= 0 - int _moveDirection; // Lua EntityPlayer:GetMovementDirection 004e4860 returns this+0x1624; update_body_animations 00779b40 sets -1/1/3... - int _headDirection; - int _fireDirection; - Vector _aimDirection; - bool _areOpposingShootDirectionsPressed; - uint8_t _pad_0x1639[0x3]; - Vector _lastDirection; - Vector _movementVector; - Vector _tearsOffset; - Vector _recentMovementVector; - int _slipperyTimer; // Update 00782af0: 60 while FLAG_SLIPPERY_PHYSICS (1<<27), else counts down to 0; update_body_animations 00779b40 uses it/60 to blend the slippery movement - Vector _lastVelocity; // update_body_animations 00779b40 copies _velocity into 0x1660/0x1664 each frame; GetTearMovementInheritance 007aaea0 uses it *0.6*2 as the tear inherited velocity - uint8_t _pad_0x1668[0x14]; - uint8_t _lastDamageSource[0x4]; // EntityRef; Lua EntityPlayer:GetLastDamageSource 0085e270 returns this+0x167c; try_trigger_astral_projection checks its _type == 6; update_effects zeroes it beside _lastDamageFlags (0x16a8) - int _lastDamageSourceVariant; // DeathScreen::Show 009997c0 "Killed by (type.%d)"; zeroed with _lastDamageFlags in UseCard 007b2230 and update_effects 00794e50 - int _lastDamageSpawnerType; // DeathScreen::Show 009997c0 "spawned by (%d.%d)" first value - int _lastDamageSpawnerVariant; // DeathScreen::Show 009997c0 "spawned by (%d.%d)" second value - uint8_t _pad_0x168c[0x1c]; - uint64_t _lastDamageFlags; - int _roomDamageTaken; // TakeDamage 007729d0 adds the damage amount; room_exit 007a6680 resets it to 0 (beside _totalDamageTaken 0x16b4) - int _totalDamageTaken; - uint8_t _pad_0x16b8[0x8]; - uint32_t _trinketsID[2]; // not in the input list (REPENTOGON 0x16b0): HasGoldenTrinket 00771620 and FUN_007a42b0 loop 2 slots at 0x16c0 masking id 0x7fff / golden 0x8000 - uint8_t _collectibleCounts[0xc]; // std_vector_int; GetCollectibleNum 00770ca0 indexes begin 0x16c8 / end 0x16cc by collectible id (shift +0x10) - uint8_t _pillEffectUses[0xc]; // std_vector_int; UsePill 007c4180 ++[pillEffect] (twice for horse pills), unlock 0x182 when [43]>4; AddPrettyFly 007abdf0 ++[10 PILLEFFECT_PRETTY_FLY] then cache 0x200; remove_twin merges the counts - uint8_t _pad_0x16e0[0x5c]; - uint8_t _levelEffectItems[0xc]; // std_vector_int; ? TriggerNewRoom_TemporaryEffects 007a8350 re-adds every id (negative = ~index into the level's list) as a temporary effect each room; level_start 007a4ba0 clears the vector - uint8_t _smeltedTrinkets[0xc]; // vector_SmeltedTrinketDesc; HasGoldenTrinket 00771620 indexes *(this+0x1748) by trinket id *4 and tests the short at +2; TryRemoveSmeltedTrinket 00772260 (shift +0x10) - uint8_t _voidedCollectibles[0xc]; // std_vector_int; VoidHasCollectible 007711a0: when an active slot holds 477 Void, scans begin 0x1754 / end 0x1758 for the id (shift +0x10) - uint8_t _voidedPassives[0xc]; // vector_VoidedPassive; UseActiveItem 005b39d0 Void (477) case: for each absorbed passive pickup push_back {collectible id, pickup _itemPoolType 0x530} via LEA ECX,[EDI+0x1760] (005bec00/005bedd7, 8-byte elements) after the random stat ups; ctor zeroes 0x1760..0x1768; Store/RestoreGameState 007ae4b0 save/restore it (stride 8, ids < collectible count); remove_twin 007a37c0 appends the twin's copy - int _extensionCordIndex; // update_effects 00794e50 Extension Cord (trinket 125): index of the familiar the chain laser currently starts from, reset to familiar count-1 when -1/out of range, decremented each beam; Init 00755470 (007572b9) sets -1 - uint8_t _collectibleRNGs[0xc]; // vector_RNG; GetCollectibleRNG 005b17c0: id<0 -> begin, bounds (end 0x1774 - begin)>>4, returns begin + id*0x10; UseActiveItem/IncrementPlayerFormCounter use RNG at begin+id*0x10 - uint8_t _trinketRNGs[0xc]; // vector_RNG; ctor 00753da0 zeroes begin/end/cap 0x177c..0x1784 after _collectibleRNGs; FUN_007d9ca0 uses *(0x177c)+0x610 (= trinket 97 * 0x10) for Tonsil; ControlActiveItem uses +0x950 (trinket 149) - uint8_t _pillRNGs[0xc]; // vector_RNG; UsePill 007c4180 indexes begin+effect*0x10 (bounds (0x178c-0x1788)>>4); StoreGameState saves the seeds - uint8_t _cardRNGs[0xc]; // vector_RNG; UseCard 007b2230 RNG at cardType*0x10 + begin; StoreGameState saves (0x1798-0x1794)>>4 seeds - int _pocketSlots[8]; // AddPocketItem/RemovePocketItem/GetMaxPocketItems: 4 (id, type) pairs, type 0 pill 1 card 2 pocket active - uint32_t _actionHoldDrop; // FUN_007a42b0 (called by Update): ++ while ACTION_DROP (11) is pressed, 0 when released; >=0x79 frames drops both trinkets and pocket items - QueueItemData _queuedItem; // Lua EntityPlayer.QueuedItem via binder 008840c0: getter 008bebc0 UserdataValue 0x14-byte copy - uint8_t _pad_0x17d0[0x8]; - bool _isHeldItemVisible; // Update 00782af0 stores IsHeldItemVisible() here each frame and tests it later in the same update - uint8_t _pad_0x17d9[0x3]; - int _playerForms[16]; // IncrementPlayerFormCounter 0075e320 writes this+0x17dc+form*4 (as _pocketSlots[form+0xf]); form 15 at 0x1818 recounts Necronomicon/Missing Page 2/trinket Missing Page; level_start 007a4ba0 recharges Necronomicon when it is >2 - uint32_t _playerFormsRewarded; // IncrementPlayerFormCounter 0075e320 tests bit (1<0; update_effects 00794e50 counts it down to 0 - int _planCKillCountdown; // UseActiveItem 005b39d0 Plan C case sets 300; update_effects 00794e50 counts it down; Store/RestoreGameState slot 0xf - short _brittleBonesUpgrades; // TakeDamage 007729d0: ++ (by broken bone hearts) with Brittle Bones (549), sets cache 2; EvaluateItems 00763570 adds it*0.4 to the tears formula - uint8_t _pad_0x1892[0x2]; - int _headColor; - int _bodyColor; - uint8_t _pad_0x189c[0x4]; - int _strengthMaxHearts; // UseCard 007b2230 Strength (12) ++ per temporary heart container; ClearTemporaryEffects 007907a0 removes that many and zeroes it; trigger_max_hearts_removed takes from it - int _epiphoraCharge; // EvaluateItems 00763570: with HasCollectible(368 Epiphora) tears *= it/180+1; update_shooting 0077b020 ++ up to 180 while firing one direction, 0 otherwise - uint8_t _pad_0x18a8[0x8]; - uint32_t _deadEyeCharges; // Lua EntityPlayer:AddDeadEyeCharge 007c78b0 ++ while <8 and sets cache 1; ClearDeadEyeCharge 007c78e0 (ZHL exact) zeroes it; EvaluateItems damage *= it*0.125+1 - uint32_t _deadEyeMisses; // ClearDeadEyeCharge 007c78e0 (ZHL exact) ++ and picks the 20/33/50% clear chance by 1/2/more; AddDeadEyeCharge 007c78b0 zeroes it - uint8_t _pad_0x18b8[0x4]; - uint32_t _mawOfTheVoidChargeTimer; // update_shooting 0077b020 fires the Maw of the Void ring once > 150 and zeroes it; FUN_0075ea40 shows it as a charge bar (it*100/150) - int _coopBabyBuffTimers[8]; // update_baby_skin_effects: co-op babies set 150-frame buffs for every player: 0x18c0 damage (cache 1), 0x18c4 fire delay (2), 0x18c8 speed (0x10), 0x18cc shot speed/range (0xc), 0x18d0 luck (0x400), 0x18d4 shrink / 0x18d8 grow (0x800), 0x18dc trinket multiplier; Update counts each down; EvaluateItems reads them - uint8_t _pad_0x18e0[0x8]; - uint32_t _imExcitedSpeedupCountdown; // UsePill 007c4180 I'm Excited!!! case (Broken Watch state 2) sets (rand(2)+2)*900; update_effects 00794e50 counts it down; Store/RestoreGameState slot 0x10 - uint8_t _pad_0x18ec[0x8]; - int _megaBlastDuration; // UseActiveItem 005b39d0 Mega Blast case sets 450 (*1.5 with 356 Car Battery); update_effects 00794e50 counts it down while firing the laser 0x1458 and removes the costume at <1 - int _peeBurstCooldown; // update_shooting 0077b020 counts it down against _maxPeeBurstCooldown 0x18fc; EvaluateItems tears *= it*5/max+1; update_effects blocks the Kidney Stone when >0 or urethra blocked 0x1908 - int _maxPeeBurstCooldown; // update_shooting 0077b020 sets 180 and compares _peeBurstCooldown against it-5; EvaluateItems 00763570 divides by it+1 - int _bladderCharge; // update_shooting 0077b020 bursts and zeroes it once >= _maxBladderCharge 0x1904; Update 00782af0 shows it/max; update_effects zeroes it - int _maxBladderCharge; // update_effects 00794e50 sets (rand+1)*30; update_shooting 0077b020 / Update 00782af0 compare _bladderCharge 0x1900 against it - bool _isUrethraBlocked; // update_effects 00794e50 sets/clears it at _nextUrethraBlockFrame 0x190c (Kidney Stone); update_shooting 0077b020 releases the stone when set and clears it - uint8_t _pad_0x1909[0x3]; - int _nextUrethraBlockFrame; // update_shooting 0077b020 sets GetFrameCount-based frame + (rand+15)*30; update_effects 00794e50 blocks the urethra once GetFrameCount >= it - EntityDesc _friendBallEnemy; - int _purityState; // FUN_007c7c60 picks the gfx/characters/costumes/PurityGlow costume by it (0..3); EvaluateItems 00763570 tests 0/1/3 per stat; TakeDamage/Update reroll it; Store/RestoreGameState slot 0xd2 - int _immaculateConceptionState; // AddImmaculateConceptionCounter 007c8050 adds the argument to it and spawns by it/threshold; Store/RestoreGameState slot 0xd3 - int _cambionConceptionState; // GetCambionPregnancyLevel 007c90b0 reads it; TakeDamage 007729d0 ++; Store/RestoreGameState slot 0xd4 - uint32_t _conceptionFamiliarFlags; // AddImmaculateConceptionCounter 007c8050 / TakeDamage 007729d0 set a bit per conception familiar granted; GetCollectibleNum 00770ca0 counts set bits; Store/RestoreGameState slot 0xd5 - float _d8DamageModifier; // UseActiveItem 005b39d0 D8 case rolls it and renormalises by (2-sum of 0x193c..0x1948)*0.25; EvaluateItems damage *= it; Store/RestoreGameState slot 0xd6 - float _d8SpeedModifier; // UseActiveItem 005b39d0 D8 case rolls it; EvaluateItems 00763570 movespeed *= it; Store/RestoreGameState slot 0xd7 - float _d8RangeModifier; // UseActiveItem 005b39d0 D8 case rolls it; EvaluateItems 00763570 range *= it; Store/RestoreGameState slot 0xd8 - float _d8FireDelayModifier; // UseActiveItem 005b39d0 D8 case rolls it; EvaluateItems 00763570 maxfiredelay = 30/(tears*it)-1; Store/RestoreGameState slot 0xd9 - int _goldenHearts; - uint8_t _pad_0x1950[0x194]; - float _bodyAngle; // update_body_animations 00779b40 LerpAngleDeg's it toward atan2 of the movement; GetBodyMoveDirection 00779900 / update_shooting fire Montezuma's Revenge (680) laser at it+180 - int _flashCountdown; // ? Update 00782af0: while >0 (or Azazel's Rage 699 effect count == 4) tints the player with a sin flash, decremented each frame - int _babySkin; - uint8_t _pad_0x1af0[0x20]; - bool _hasBabyRoomShield; // ? room_enter 007a6c50 sets 1; TakeDamage 007729d0 for a co-op baby (variant 1) with _babySkin 11 consumes it and ignores the hit - uint8_t _pad_0x1b11[0x7]; - bool _isGlitchBaby; // Init 00755470: co-op baby (variant 1) with subtype 25 sets 1 (and rolls GetGlitchBabySubType), else 0; level_start 007a4ba0 re-sets _babySkin=25 and InitBabySkin when it is set - uint8_t _pad_0x1b19[0x3]; - Vector _moveToTarget; // Update 00782af0: while != (0,0) moves the player 0.18 of the way toward it (SetPosition); FUN_005cd780 sets it, GridEntity_TrapDoor::Update / RoomTransition::Update aim it at a grid cell (col*40+40, row*40+120); level_start / release_weapons_and_effects zero it - int _delayedSfxId; // PlayDelayedSFX 007cb5d0 (ZHL soundEffectID) stores it; Update 00782af0 plays it when 0x1b2c counts down to 0 - float _delayedSfxVolume; // PlayDelayedSFX 007cb5d0 stores the volume (xmm2) here - int _delayedSfxDelay; // PlayDelayedSFX 007cb5d0 stores soundDelay; Update 00782af0 decrements and plays 0x1b24 at 0; room_enter sets 30/60 - int _delayedSfxFrameDelay; // PlayDelayedSFX 007cb5d0 stores frameDelay, passed as SoundEffects::Play frameDelay - uint8_t _pad_0x1b34[0x248]; - uint8_t _movingBoxContents[0xc]; // vector_EntitySaveState; TryDecreaseGlowingHourglassUses 007b9e10: with HasCollectible(523 Moving Box) walks begin 0x1d7c..end 0x1d80 in 0x78-byte save states for pickup 5.100.422; UseActiveItem Moving Box case restores pickups from it; StoreGameState saves (end-begin)/0x78 - int _boneHearts; - int _boneHeartsMask; // Lua EntityPlayer:IsBoneHeart 007caaa0 tests bit (1<= 1; AddBoneHearts 007ca840 updates it - int _hallowedGroundCountdown; // GridEntity_Poop::Update / NpcAI::ENTITY_POOP refresh it for players in the white-poop aura; update_effects 00794e50 counts it down; EvaluateItems tears *2.5 while set; TakeDamage tests >0 - short _damageMultiplierStacks; // ? FUN_0060d0c0 increments it; EvaluateItems 00763570 damage *= pow(1.5, it) when >0; Update 00782af0 re-evaluates cache 1 when it differs from 0x1d96 and resets it to 0 later - short _lastDamageMultiplierStacks; // ? Update 00782af0 copies 0x1d94 here after setting cache 1 when they differ - int _subPlayer; - uint32_t _forgottenBody; // Entity_Familiar* // FUN_007cbef0 (The Soul, type 17) SpawnEx(3, 900 Forgotten body) and keeps it here (Remove via vtable+0x28 first); init_player_type_state / MorphToCoopGhost test it - int _brokenHearts; - int _rottenHearts; - int _effectiveSoulCharge; - int _effectiveBloodCharge; - uint8_t _pad_0x1db0[0x20]; - uint32_t _urnSouls; // AddUrnSouls 007d3480 adds amount to it; Weapon_UrnOfSouls::Fire requires >0; PlayerHUD::RenderActiveItem draws it; Store/RestoreGameState slot 0x114 - int _numGigaBombs; - uint8_t _pad_0x1dd8[0x4]; - uint8_t _pendingWisps[0xc]; // std_vector_int; TriggerRoomClear 007a8fd0 calls AddWisp(id) for every id of begin 0x1ddc..end 0x1de0, then empties it; ctor zeroes the 3 dwords - uint8_t _pad_0x1de8[0x4]; - History _history; // DischargeActiveItem 007ac7e0 calls History::AddHistoryItem 00721a70 with ECX = this+0x1dec; ctor 00753da0 inits 0x1dec..0x1dfc (owner ptr = this at +0x10) right before _inventory 0x1e00 (shift +0x14) - int _inventory[16]; // Tainted Isaac's slots of history indices, -1 empty; slot 0 dropped by a pickup past GetMaxInventorySize (characters_9.md) - uint8_t _contactHitList[0xc]; // std_vector_int; sorted entity-index hit list: ctor zeroes 0x1e40..0x1e48; HandleCollision 0078e1f0 with Mega Mush (625) effect skips enemies EntityList::HitListContains(this+0x1e40) and sorted_vector_insert_unique's the rest; update_effects 00794e50 Pony/Mars/Suplex dash checks and clears it; UseActiveItem 005b39d0 clears it - uint8_t _userProfile[0x8]; // UserProfile; embedded KAGE::System::UserProfile (vptr + impl ptr at 0x1e50): ctor 00753da0 stores vftable 0xb82d98 (RTTI .?AVUserProfile@System@KAGE@@), dtor 00754ed0 resets to UserProfileBase 0xb82e20; Init 00755470 (00756b2d) sets impl 0x1e50 from the netplay player table; IsInnateCollectible 00771200 reads impl+8/+0xc (64-bit id); AddCollectible/HasCollectible call FUN_00a23920 (returns impl+8 qword) on it - uint8_t _afterImageFrames[0x14]; // deque_afterImageFrames; Render 0078ca00 walks a deque (map 0x1e58, mapsize 0x1e5c, off 0x1e60, size 0x1e64) of frames and redraws the player at each stored position with alpha frame/10 (the after images); ctor 00753da0 inits it with a proxy (shift +0x1c) - uint8_t _twinPlayer[0x4]; // EntityPtr; InitTwin 007d2000 sets it on both twins with the EntityPtr multiset erase/insert; GetOtherTwin 00417820 returns it (same member as the Lua _otherTwin; shift +0x1c) - uint32_t _backupPlayer; // Entity_Player* // GetCollectibleNum 00770ca0 adds GetCollectibleNum(*(this+0x1e6c)) for tag-0x40000000 items and AddCostume 0075d1d0 mirrors costumes onto it, as REPENTOGON's GetOwners/GetTotalCount do with _backupPlayer - float _heightVelocity; // Update 00782af0: posOffset.y += it, then += 1.1 (0.6 with flag 0x4000000) per frame like gravity, reset to 0 on landing; room_enter zeroes it; update_body_animations bails while it is <0 - int _redStewBonusDuration; // EvaluateItems 00763570 damage += (it/10)*0.04 while >0; update_effects 00794e50 counts it down and re-evaluates at each /10 step; UseActiveItem 005b39d0 adds 2700 behind a HasCollectible test; bracketed by _backupPlayer 0x1e6c and Mars 0x1e8c, all +0x1c - uint8_t _pad_0x1e78[0x8]; - uint8_t _salvationEffect[0xc]; // EntityPtr; update_effects 00794e50 spawns it with Salvation (696), removes it (vtable +0x28) without it; Update 00782af0 keeps it on the player and spins its sprite by frame count; release_weapons_and_effects removes it - int _marsUnk1; // ctor 00753da0 inits it to 90; update_body_animations 00779b40 copies it into the Mars cooldown 0x1e90 on a dash (it is the dash cooldown length) - int _marsCooldown; // update_body_animations 00779b40: a Mars (593) double tap dashes only while it is <1, then it is set from 0x1e8c - int _marsUnk2; // ctor inits -1; update_body_animations 00779b40 stores the dash direction (the tapped action) here on a Mars dash - bool _marsUnkBool; // ctor inits 1; update_body_animations 00779b40 clears it when a Mars dash starts - uint8_t _pad_0x1e99[0x3]; - int _marsLastTapDirection; // not in REPENTOGON: update_body_animations 00779b40 stores the last tapped move action (0..3); a repeat within 11 frames triggers the Mars dash - int _marsTapFrames; // not in REPENTOGON: update_body_animations 00779b40 frames since the last move tap, ++ each frame capped at 10000, reset to 0 on a tap; <0xb means double tap - uint8_t _pad_0x1ea4[0x4]; - int _poisonDamageFrames; // ? Update 00782af0: ++ each frame while the pending damage flags at Entity +0x18 (OR-ed by TakeDamage 007729d0 for 0-damage hits) hold DAMAGE_POISON_BURN 0x8000 (cleared by Evil Charm 632), plays SFX 590 and tints by min(it/30,1); 0 when the bit is gone - uint8_t _astralProjectionBody[0x4]; // EntityPtr; try_trigger_astral_projection 007afc20: when null spawns an effect with the player's sprite playing "Death" (ghost layer hidden) and SetReference's it here (multiset erase/insert); try_end_astral_projection 007d35b0 / trigger_collectible_effect_removed 00793970 teleport the player to its _pos and Remove it (vtable +0x28); TakeDamage 007729d0 tests it - float _rockBottomMoveSpeed; // EvaluateItems 00763570 Rock Bottom (562) block, cache 0x10: movespeed = max(movespeed, this+0x1eb0) and stores it back (shift +0x1c) - float _rockBottomMaxFireDelay; // EvaluateItems 00763570 Rock Bottom block, cache 2: stores max(30/(maxfiredelay+1), it), the tears rate, then rebuilds maxfiredelay from it - float _rockBottomDamage; // EvaluateItems 00763570 Rock Bottom block, cache 1: damage = max(damage, it), stored back - float _rockBottomTearRange; // EvaluateItems 00763570 Rock Bottom block, cache 8: tearrange = max(tearrange, it), stored back - float _rockBottomShotSpeed; // EvaluateItems 00763570 Rock Bottom block, cache 4: shotspeed = max(shotspeed, it), stored back - float _rockBottomLuck; // EvaluateItems 00763570 Rock Bottom block, cache 0x400: luck = max(luck, it), stored back - uint8_t _pad_0x1ec8[0x4]; - int _reverseEmpressMaxHearts; // UseCard 007b2230 Reverse Empress (59, null 0x3e) ++ per temporary heart container; trigger_collectible_effect_removed 00793970 null 0x3e removes that many and zeroes it; trigger_max_hearts_removed takes from it first - int _reverseChariotMoveCooldown; // update_body_animations 00779b40 under null effect 63 (added by card 63 Reverse Chariot): moving input gives a velocity lurch and sets 5, counts down; 0 without the effect - int _reverseSunBoneHearts; // UseCard 007b2230 Reverse Sun (75) converts red heart containers to bone hearts and stores the count; trigger_collectible_effect_removed null 0x42 converts them back while >0 - uint8_t _pad_0x1ed8[0x4]; - uint32_t _revelationChargeTimer; // update_shooting 0077b020: with Revelation (643) fires the laser once it is >150 (shift +0x1c) - uint32_t _montezumaChargeTimer; // update_shooting 0077b020: with Montezuma's Revenge (680) fires the backward laser once it is >150 (shift +0x1c) - uint32_t _montezumaLaser; // Entity* // GetBodyMoveDirection 00779900: with Montezuma's Revenge (680) uses its angle (+0x41c)+180 when it is non-null and _type == 7 (laser) - float _jupiterCharge; // update_body_animations 00779b40: with Jupiter (594) += speedMult/60 up to 1 while standing still, drains while moving (fart sounds >0.3); 0 without the item - uint8_t _holyMantleStacks; // ? TriggerNewRoom_TemporaryEffects 007a8350 re-adds the Holy Mantle (313, item config +0x4e4) effect (it >> 4) times each new room; FUN_007dafb0 subtracts the low nibble, FUN_007daff0/FUN_007db0a0 rewrite it; saved in GameStatePlayer - uint8_t _pad_0x1eed[0x3]; - int _ductTapeMode; // update_body_animations 00779b40: golden Duct Tape (trinket 109, multiplier >=2) drop action cycles 1..3, 0 otherwise; TriggerTrinketAdded 007ad860 sets 1; saved as a byte - uint32_t _maggyHealthDrainCooldown; // Update 00782af0: set to 300 and counted down; at <1 drains one red/soul heart (Tainted Magdalene temporary hearts); TakeDamage 007729d0 resets it to 0 (shift +0x24) - int _maggySwingCooldown; // same member as db/fields.tsv _hugCountdown (Tainted Magdalene swing: 9 on a swing, swings again under 3); REPENTOGON 0x1ed4 +0x24 like its neighbour 0x1ef4 - float _jellyBellyBounceTimer; // TakeDamage 007729d0: Jelly Belly (690) deflect sets 14/20; Update 00782af0 decrements by speedMult and wobbles sprite scale with sin(t*2pi/10) - uint8_t _pad_0x1f00[0x8]; - int _forgottenBodyRoomIdx; // FUN_007cbef0 / init_player_type_state 007cc200 split it into room idx%169 and dimension idx/169 to find the room the body is in, -99999 = none (level_start resets it) - Vector _forgottenBodyPos; // FUN_007cbef0 spawns the Forgotten body here when 0x1f08 != -99999; PlayerManager::replace_player copies 0x1f08..0x1f10 and resets the source - uint8_t _pad_0x1f14[0x4]; - uint8_t _echoChamberItems[0x14]; // deque_EchoChamberItem; TriggerEchoChamber: with Echo Chamber (700) replays every queued (id, type) pair (type 1 card -> UseCard, 0 pill -> UsePill), push_back the new one, keeps at most 3 (size 0x1f28, off 0x1f24); ctor builds the deque proxy - int _suplexState; // update_suplex 007d4390: state machine (1 aim, 2 grab, 3 leap up, 5 super leap) at this+0x7cb*4 - int _suplexAimCountdown; // update_suplex 007d4390 counts it down (this+0x7cc*4) and ends the aim at <=0; update_effects 00794e50 sets it to 60 when Suplex starts - Vector _suplexTargetPos; // update_suplex 007d4390 stores the held entity's (or own) position here on LeapUp (this+0x7cd/0x7ce*4) - Vector _suplexLandPos; // update_suplex 007d4390 stores the player's own position here on LeapUp (this+1999/2000*4), right after _suplexTargetPos - int8_t _bagOfCraftingContent[8]; // not in the input list (REPENTOGON 0x1f20): FUN_007a42b0 rotates the 8 bytes at 0x1f44 on the drop button when playerType is 23 Tainted Cain (shift +0x24) - uint8_t _bagOfCraftingOutput[0x8]; // BagOfCraftingOutput; ControlActiveItem 00791a40: with item state 710 Bag of Crafting, holding 30 frames queues collectible *(this+0x1f4c) from pool *(this+0x1f50), then clears it to 0/-1 with the 8-byte bag at 0x1f44; UseActiveItem 005b39d0 fills both - int _poopMana; - int8_t _poopSpellQueue[6]; // update_bomb_input 00780f40 UsePoopSpell(0x1f58) then shifts 0x1f59..0x1f5d down; UseActiveItem does the same (REPENTOGON 0x1f34, shift +0x24) - uint8_t _pad_0x1f5e[0x1a]; - int _bagOfCraftingHoldFrames; // ControlActiveItem 00791a40: with item state 710 and an output, ++ while held, >29 crafts and resets; FUN_0075ea40 renders ((x-5)/25)*100 % charge; UseActiveItem zeroes - int _eveSumptoriumCharge; // update_shooting 0077b020: for Tainted Eve (type 26) ++ while charging, at >59 zeroes it and fires; FUN_0075ea40 shows it as a charge bar (it/60*100) - uint8_t _itemWispsList[0x8]; // std_map_int_int; HasCollectible 007706e0: when size 0x1f84 != 0, std::set find in the tree at 0x1f80 and node value (+0x14) >= 1 counts; RecomputeWispCollectibles 007d7740 rebuilds it from item wisps (3.237) keyed by subtype; ctor builds the head - float _forgottenBHeight; // Update 00782af0: for Tainted Forgotten (type 35) += 0x1f8c each frame, clamped at 0 with a -0.45 bounce, added to the render y; PlayerManager::replace_player copies it with 0x1f8c and 0x1e70 - float _forgottenBHeightVelocity; // Update 00782af0: Tainted Forgotten (type 35) vertical speed, +0.6 per frame, *-0.45 on landing when >=2, reduced by 0x1f88*0.2 while falling - uint8_t _pad_0x1f90[0x14]; - uint8_t _itemCards[0xc]; // std_vector_uint; AddItemCard 007d8240 push_back up to min(Starter Deck count+3, 20) entries, spawning the oldest as card 300 when full; pockets_rotate 007a42b0 rotates it; PlayerHUD::Update draws it - uint8_t _roomTemporaryCollectibles[0x8]; // std_map_int_int; ctor builds a tree head at 0x1fb0 (size 0x1fb4); ClearTemporaryEffects 007907a0 walks it and RemoveCollectible(id) count (node+0x14) times, zeroes the counts and erases the tree - int _modelingClayEffect; - int _keepersSackBonus; // FUN_007d8630 adds coins spent here when HasCollectible(716 Keeper's Sack); EvaluateItems 00763570 turns it into damage/range/speed bonuses (shift +0x24) - uint8_t _darkEsau[0x4]; // EntityPtr; NpcAI::ENTITY_DARK_ESAU 005542e0 checks spawner player's +0x1fc0 == npc; DischargeActiveItem 007ac7e0 / release_weapons_and_effects 00757ac0 move/clear it with the EntityPtr multiset erase/insert - bool _isLevelStartPending; // level_start 007a4ba0 sets it on the _backupPlayer and clears its own; Update 00782af0 runs level_start(1) once it is set; saved - uint8_t _pad_0x1fc5[0x3]; - PlayerProceduralItems _proceduralItems; // embedded {Entity_Player* owner at 0x1fc8, std::set at 0x1fcc (head, size 0x1fd0)}: Init 00755470 (007575bb) stores this at 0x1fc8; ctor builds the set head; TryRemoveTrinket 00771f60 walks the set for negative (glitched) ids in Game _proceduralItemManager 0x67758 and RemoveCollectible's on the owner; trigger_set_dispatch 009e0680 runs glitched_item_effects_run(id, owner, ...) for every id, called with ECX=this+0x1fc8 from EvaluateItems, TakeDamage, TriggerRoomClear, trigger_npc_death, Weapon::TriggerTearEffects, Entity_NPC::TakeDamage; Store/RestoreGameState copy the set - uint8_t _extraCollectibleCounts[0xc]; // std_vector_uint8; ? GetCollectibleNum 00770ca0 adds byte begin[id] (bounds end 0x1fd8 - begin) to the count; is_achievement_79_unlocked 007db860 reads byte [0x8f] - uint8_t _extraTrinketCounts[0xc]; // std_vector_uint8; ? Init 00755470 resizes it to the trinket count (Game+0x2a414-0x2a410)>>2 and zeroes it, right after doing the same to _extraCollectibleCounts 0x1fd4 with the collectible count; GetTrinketMultiplier 007cb6e0 adds 1 when byte begin[id] (bounds end 0x1fe4) is non-zero - uint8_t _pad_0x1fec[0x18]; - bool _darkArtsBlastPending; // set as Dark Arts ends; the blast waits for the last snare (characters_9.md) - uint8_t _pad_0x2005[0x3]; - float _darkArtsDamage; // the snares' summed damage, the end blast's DamageRadius damage (characters_9.md) - uint32_t _darkArtsLastSnare; // Entity* // the newest 1000.194 Dark Snare (characters_9.md) - uint8_t _darkArtsHitList[0xc]; // std_vector_int; ctor zeroes 0x2010..0x2018; update_effects 00794e50 clears it when the Dark Arts end blast fires (beside _darkArtsBlastPending 0x2004 / _darkArtsDamage 0x2008) and HitListContains/clear it at 0079989b..00799bb9; UseActiveItem 005b39d0 (005c3dcf) uses it in the Dark Arts case - uint8_t _shadowImage[8]; // image handle (+0 ptr, +4 owner, like Game _giantBookClickerImage): Init 00755470 (007577fd) assigns Manager::LoadImage("gfx/shadow.png"); Render 0078ca00 (netplay) reads width/height at ptr+0x10/+0x14 and draws it at pos+_shadowOffset scaled by _shadowSize; dtor 00754ed0 releases owner 0x2020 - int _grantedCollectibleCountdown; // ? FUN_007d8740 adds to it capped at 4 with the flags in 0x2028; update_effects 00794e50 counts it down and clears 0x2028 at 0; EvaluateItems gives +1.5 tears/+1 while >0 - uint32_t _grantedCollectibleFlags; // HasCollectible 007706e0 / GetCollectibleNum 00770ca0 report Scorpio 305 (0x10), Fire Mind 257 (8), Ball of Tar 231 (0x20), Sacred Heart 182 (0x40) while the bit is set; set by FUN_007d8740, cleared by update_effects - bool _hasCurseMistEffect; - uint8_t _pad_0x202d[0x3]; - uint8_t _consumablesBackup[0x20]; // ConsumableData; AddCurseMistEffect 007d8980 copies coins/keys/bombs/golden key/golden bomb/soul charge/giga bombs/poop mana/blood charge into 0x2030..0x204c in ConsumableData order (shift +0x1c) - uint8_t _curseMistFamiliars[0xc]; // vector_FamiliarData; AddCurseMistEffect 007d8980 pushes 0x34-byte familiar records into begin 0x2050 / end 0x2054 / cap 0x2058; RemoveCurseMistEffect 007d8d20 respawns from it; StoreGameState saves it - int _curseMistRedHearts; // AddCurseMistEffect stores _redHearts here for Keeper (type 14) before AddMaxHearts(0); RemoveCurseMistEffect restores _redHearts from it - int _curseMistPocketSlots[8]; // AddCurseMistEffect copies _pocketSlots[0..7] here and clears them; RemoveCurseMistEffect copies back; MorphToCoopGhost moves it into 0x20ac - uint32_t _curseMistTrinkets[2]; // AddCurseMistEffect saves _trinketsID[0..1] here; RemoveCurseMistEffect restores them; MorphToCoopGhost moves and zeroes it - Vector _minecartOffset; // AttachMinecart stores pos - minecart._targetPosition here (x 0x2088, y 0x208c); ctor zeroes both - uint8_t _wildCardItemType; // UseCard 007b78de case CARD_WILD (80): switches on this byte (0 pill, 1 card, 2 active item) (shift +0x2c) - uint8_t _pad_0x2091[0x3]; - int _wildCardItem; // UseCard case CARD_WILD (80) reuses this id as the pill/card/active item; 0x2098 holds the pill flags / active var data passed with it - int _wildCardVarData; // ControlActiveItem 00791a40 stores the active slot's _varData (pill color) beside _wildCardItem; UseCard 007b2230 Wild Card UsePill(_wildCardItem, it, 0x180); saved - int _samsonBerserkCharge; // Lua EntityPlayer.SamsonBerserkCharge via binder 00884240: getter 008becf0 FUN_0085bfd0 signed dword, setter checkinteger dword - float _ibsCharge; // Lua EntityPlayer.IBSCharge via binder 00883940: getter 008be6b0 FUN_0085c050 pushnumber, setter checknumber -> float - uint8_t _pad_0x20a4[0x5]; - bool _isCoopGhost; - uint8_t _pad_0x20aa[0x2]; - int _ghostPocketSlots[8]; // MorphToCoopGhost copies _pocketSlots[0..7] (or the Curse Mist backup 0x2060) here; RevivePlayerGhost restores _pocketSlots from it; Store/RestoreGameState - uint32_t _ghostTrinkets[2]; // MorphToCoopGhost stores the trinkets here; RevivePlayerGhost restores _trinketsID[0..1] from 0x20cc/0x20d0 - uint32_t _playerHUD; // PlayerHUD* // Update 00782af0 (00782b86): MOV ECX,[EDI+0x20d4]; if non-null CALL PlayerHUD::Update 00842230 (shift +0x2c) - uint8_t _pad_0x20d8[0x4]; - uint8_t _greedResetCollectibles[0xc]; // std_vector_int; ? ResetPlayer 007daed0 re-adds every id of begin 0x20dc..end 0x20e0 via AddCollectible; Game::reset_players_for_greed 007db3b0 copies it (also for the backup player) - bool _hasUnlistedRestoreState; // PlayerManager::replace_player 009bee80 sets it to 1 after StoreGameState into 0x20ec; when set on the incoming player it restores from 0x20ec and clears it - uint8_t _pad_0x20e9[0x3]; - uint8_t _unlistedRestoreState[0x5dc]; // GameStatePlayer; PlayerManager::replace_player 009bee80: GameStatePlayer::Init + Entity_Player::StoreGameState on this+0x20ec, and RestoreGameState from it later - uint32_t _replacedPlayer; // Entity_Player* // PlayerManager::replace_player 009bee80 writes the other player into 0x26c8 of both the old and the new player (shift +0x4c: GameStatePlayer grew by 0x20) - uint8_t _pad_0x26cc[0x834]; -}; -static_assert(offsetof(Entity_Player, _damageEvents) == 0x8); -static_assert(offsetof(Entity_Player, _pendingDamage) == 0x14); -static_assert(offsetof(Entity_Player, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity_Player, _index) == 0x20); -static_assert(offsetof(Entity_Player, _collisionIndex) == 0x24); -static_assert(offsetof(Entity_Player, _type) == 0x28); -static_assert(offsetof(Entity_Player, _variant) == 0x2c); -static_assert(offsetof(Entity_Player, _subtype) == 0x30); -static_assert(offsetof(Entity_Player, _spawnerType) == 0x34); -static_assert(offsetof(Entity_Player, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity_Player, _sprite) == 0x48); -static_assert(offsetof(Entity_Player, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity_Player, _spriteScale) == 0xe4); -static_assert(offsetof(Entity_Player, _isFlipX) == 0x148); -static_assert(offsetof(Entity_Player, _shadowSize) == 0x15c); -static_assert(offsetof(Entity_Player, _shadowOffset) == 0x160); -static_assert(offsetof(Entity_Player, _flags) == 0x168); -static_assert(offsetof(Entity_Player, _valid) == 0x170); -static_assert(offsetof(Entity_Player, _visible) == 0x171); -static_assert(offsetof(Entity_Player, _exists) == 0x172); -static_assert(offsetof(Entity_Player, _dead) == 0x173); -static_assert(offsetof(Entity_Player, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity_Player, _isInterpolating) == 0x175); -static_assert(offsetof(Entity_Player, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity_Player, _removedByFactory) == 0x177); -static_assert(offsetof(Entity_Player, _collisionPoints) == 0x178); -static_assert(offsetof(Entity_Player, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity_Player, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity_Player, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity_Player, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity_Player, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity_Player, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity_Player, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity_Player, _colorParams) == 0x1ac); -static_assert(offsetof(Entity_Player, _color) == 0x1b8); -static_assert(offsetof(Entity_Player, _splatColor) == 0x1e4); -static_assert(offsetof(Entity_Player, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity_Player, _damageCountdown) == 0x214); -static_assert(offsetof(Entity_Player, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity_Player, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity_Player, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity_Player, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity_Player, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity_Player, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity_Player, _fearCountdown) == 0x230); -static_assert(offsetof(Entity_Player, _burnCountdown) == 0x234); -static_assert(offsetof(Entity_Player, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity_Player, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity_Player, _charmSource) == 0x240); -static_assert(offsetof(Entity_Player, _entityRef2) == 0x268); -static_assert(offsetof(Entity_Player, _entityRef3) == 0x290); -static_assert(offsetof(Entity_Player, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity_Player, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity_Player, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity_Player, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity_Player, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity_Player, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity_Player, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity_Player, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity_Player, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity_Player, _iceCountdown) == 0x300); -static_assert(offsetof(Entity_Player, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity_Player, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity_Player, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity_Player, _pausePosition) == 0x314); -static_assert(offsetof(Entity_Player, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity_Player, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity_Player, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity_Player, _spawnFrame) == 0x328); -static_assert(offsetof(Entity_Player, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity_Player, _config) == 0x330); -static_assert(offsetof(Entity_Player, _targetPosition) == 0x334); -static_assert(offsetof(Entity_Player, _pos) == 0x33c); -static_assert(offsetof(Entity_Player, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity_Player, _posOffset) == 0x34c); -static_assert(offsetof(Entity_Player, _renderZOffset) == 0x354); -static_assert(offsetof(Entity_Player, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity_Player, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity_Player, _velocity) == 0x360); -static_assert(offsetof(Entity_Player, _baseFriction) == 0x368); -static_assert(offsetof(Entity_Player, _friction) == 0x36c); -static_assert(offsetof(Entity_Player, _size) == 0x370); -static_assert(offsetof(Entity_Player, _sizeMulti) == 0x374); -static_assert(offsetof(Entity_Player, _mass) == 0x37c); -static_assert(offsetof(Entity_Player, _health) == 0x380); -static_assert(offsetof(Entity_Player, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity_Player, _collisionDamage) == 0x388); -static_assert(offsetof(Entity_Player, _prevPosition) == 0x38c); -static_assert(offsetof(Entity_Player, _prevVelocity) == 0x394); -static_assert(offsetof(Entity_Player, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity_Player, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity_Player, _updateTime) == 0x3a4); -static_assert(offsetof(Entity_Player, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity_Player, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity_Player, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity_Player, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity_Player, _parent) == 0x3bc); -static_assert(offsetof(Entity_Player, _child) == 0x3c0); -static_assert(offsetof(Entity_Player, _target) == 0x3c4); -static_assert(offsetof(Entity_Player, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity_Player, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity_Player, _minecart) == 0x3d4); -static_assert(offsetof(Entity_Player, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity_Player, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity_Player, _initSeed) == 0x3ec); -static_assert(offsetof(Entity_Player, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity_Player, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity_Player, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity_Player, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity_Player, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity_Player, _luaBridgeRef) == 0x408); -static_assert(offsetof(Entity_Player, _isControlsEnabled) == 0x410); -static_assert(offsetof(Entity_Player, _controlsCooldown) == 0x414); -static_assert(offsetof(Entity_Player, _fireBlockCooldown) == 0x418); -static_assert(offsetof(Entity_Player, _bodySprite) == 0x41c); -static_assert(offsetof(Entity_Player, _crownOfLightSprite) == 0x530); -static_assert(offsetof(Entity_Player, _darkPrincesCrownSprite) == 0x644); -static_assert(offsetof(Entity_Player, _chargeBarSprites) == 0x758); -static_assert(offsetof(Entity_Player, _bloodGushSprite) == 0xee4); -static_assert(offsetof(Entity_Player, _heldSprite) == 0xff8); -static_assert(offsetof(Entity_Player, _statusEffectSprite) == 0x110c); -static_assert(offsetof(Entity_Player, _costumeSpriteDescs) == 0x1220); -static_assert(offsetof(Entity_Player, _playerCostumeMap) == 0x122c); -static_assert(offsetof(Entity_Player, _headAnim) == 0x1320); -static_assert(offsetof(Entity_Player, _blinkTime) == 0x1338); -static_assert(offsetof(Entity_Player, _headDirectionTime) == 0x133c); -static_assert(offsetof(Entity_Player, _maxHearts) == 0x1340); -static_assert(offsetof(Entity_Player, _redHearts) == 0x1344); -static_assert(offsetof(Entity_Player, _eternalHearts) == 0x1348); -static_assert(offsetof(Entity_Player, _soulHearts) == 0x134c); -static_assert(offsetof(Entity_Player, _blackHearts) == 0x1350); -static_assert(offsetof(Entity_Player, _jarHearts) == 0x1354); -static_assert(offsetof(Entity_Player, _jarFlies) == 0x1358); -static_assert(offsetof(Entity_Player, _numKeys) == 0x135c); -static_assert(offsetof(Entity_Player, _hasGoldenKey) == 0x1360); -static_assert(offsetof(Entity_Player, _hasGoldenBomb) == 0x1361); -static_assert(offsetof(Entity_Player, _numBombs) == 0x1364); -static_assert(offsetof(Entity_Player, _numCoins) == 0x1368); -static_assert(offsetof(Entity_Player, _numBlueFlies) == 0x136c); -static_assert(offsetof(Entity_Player, _numBlueSpiders) == 0x1370); -static_assert(offsetof(Entity_Player, _gnawedLeafTimer) == 0x1374); -static_assert(offsetof(Entity_Player, _lastActionTriggers) == 0x1378); -static_assert(offsetof(Entity_Player, _bloodLustCounter) == 0x137c); -static_assert(offsetof(Entity_Player, _deadCatLives) == 0x137e); -static_assert(offsetof(Entity_Player, _tonsilCounter) == 0x1380); -static_assert(offsetof(Entity_Player, _tonsilCount) == 0x1382); -static_assert(offsetof(Entity_Player, _numLeprosy) == 0x1384); -static_assert(offsetof(Entity_Player, _metronomeCollectibleID) == 0x1388); -static_assert(offsetof(Entity_Player, _bleedOutHealth) == 0x138c); -static_assert(offsetof(Entity_Player, _threeDollarBillItem) == 0x1390); -static_assert(offsetof(Entity_Player, _monkeyPawCounter) == 0x1394); -static_assert(offsetof(Entity_Player, _isPlayingExtraAnimation) == 0x1398); -static_assert(offsetof(Entity_Player, _isHurtPending) == 0x1399); -static_assert(offsetof(Entity_Player, _isPlayingItemAnimation) == 0x139a); -static_assert(offsetof(Entity_Player, _queuedExtraAnimation) == 0x139c); -static_assert(offsetof(Entity_Player, _holyMantleState) == 0x13b4); -static_assert(offsetof(Entity_Player, _isBrokenRemotePending) == 0x13b6); -static_assert(offsetof(Entity_Player, _cursedPennyPending) == 0x13b8); -static_assert(offsetof(Entity_Player, _damageCooldown) == 0x13bc); -static_assert(offsetof(Entity_Player, _playerType) == 0x13c0); -static_assert(offsetof(Entity_Player, _name) == 0x13c4); -static_assert(offsetof(Entity_Player, _weapons) == 0x13dc); -static_assert(offsetof(Entity_Player, _markedTarget) == 0x140c); -static_assert(offsetof(Entity_Player, _heldEntity) == 0x1410); -static_assert(offsetof(Entity_Player, _isHeldEntityVisible) == 0x1414); -static_assert(offsetof(Entity_Player, _heldEntityGridCollisionClass) == 0x1418); -static_assert(offsetof(Entity_Player, _heldEntityCollisionClass) == 0x141c); -static_assert(offsetof(Entity_Player, _tractorBeam) == 0x1430); -static_assert(offsetof(Entity_Player, _breathOfLifeEffect) == 0x1444); -static_assert(offsetof(Entity_Player, _megaBlastLaser) == 0x1458); -static_assert(offsetof(Entity_Player, _rUaWizardTimer) == 0x145c); -static_assert(offsetof(Entity_Player, _maxfiredelay) == 0x1460); -static_assert(offsetof(Entity_Player, _shotspeed) == 0x1464); -static_assert(offsetof(Entity_Player, _firedTearCount) == 0x146c); -static_assert(offsetof(Entity_Player, _damage) == 0x1470); -static_assert(offsetof(Entity_Player, _tearheight) == 0x1474); -static_assert(offsetof(Entity_Player, _tearfallspeed) == 0x1478); -static_assert(offsetof(Entity_Player, _tearfallaccel) == 0x147c); -static_assert(offsetof(Entity_Player, _tearrange) == 0x1480); -static_assert(offsetof(Entity_Player, _tearFlags) == 0x1488); -static_assert(offsetof(Entity_Player, _tearColor) == 0x1498); -static_assert(offsetof(Entity_Player, _laserColor) == 0x14c4); -static_assert(offsetof(Entity_Player, _playerSpriteScale) == 0x14f0); -static_assert(offsetof(Entity_Player, _bodyScale) == 0x14f8); -static_assert(offsetof(Entity_Player, _headScale) == 0x1500); -static_assert(offsetof(Entity_Player, _temporaryeffects) == 0x1508); -static_assert(offsetof(Entity_Player, _speedModifier) == 0x1520); -static_assert(offsetof(Entity_Player, _fireDelayModifier) == 0x1524); -static_assert(offsetof(Entity_Player, _damageModifier) == 0x1528); -static_assert(offsetof(Entity_Player, _tearRangeModifier) == 0x152c); -static_assert(offsetof(Entity_Player, _shotSpeedModifier) == 0x1530); -static_assert(offsetof(Entity_Player, _luckModifier) == 0x1534); -static_assert(offsetof(Entity_Player, _donateLuck) == 0x1538); -static_assert(offsetof(Entity_Player, _potatoPeelerCounter) == 0x153c); -static_assert(offsetof(Entity_Player, _potatoPeelerBandageCounter) == 0x1540); -static_assert(offsetof(Entity_Player, _greedsGulletHearts) == 0x1544); -static_assert(offsetof(Entity_Player, _greedsGulletOverflow) == 0x1546); -static_assert(offsetof(Entity_Player, _greedsGulletRedHearts) == 0x1548); -static_assert(offsetof(Entity_Player, _isUpdatingGreedsGullet) == 0x154a); -static_assert(offsetof(Entity_Player, _edenSpeed) == 0x154c); -static_assert(offsetof(Entity_Player, _edenFireDelay) == 0x1550); -static_assert(offsetof(Entity_Player, _edenDamage) == 0x1554); -static_assert(offsetof(Entity_Player, _edenTearRange) == 0x1558); -static_assert(offsetof(Entity_Player, _edenShotSpeed) == 0x155c); -static_assert(offsetof(Entity_Player, _edenLuck) == 0x1560); -static_assert(offsetof(Entity_Player, _taurusSpeedBonus) == 0x1564); -static_assert(offsetof(Entity_Player, _movespeed) == 0x1568); -static_assert(offsetof(Entity_Player, _luck) == 0x156c); -static_assert(offsetof(Entity_Player, _canFly) == 0x1570); -static_assert(offsetof(Entity_Player, _cacheFlags) == 0x1574); -static_assert(offsetof(Entity_Player, _tearDisplacement) == 0x1578); -static_assert(offsetof(Entity_Player, _meleeDamage) == 0x157c); -static_assert(offsetof(Entity_Player, _activeDesc) == 0x1580); -static_assert(offsetof(Entity_Player, _itemState) == 0x1600); -static_assert(offsetof(Entity_Player, _itemStateCooldown) == 0x1604); -static_assert(offsetof(Entity_Player, _vampireCharmKills) == 0x1608); -static_assert(offsetof(Entity_Player, _bombPlaceDelay) == 0x1610); -static_assert(offsetof(Entity_Player, _forgottenSwapFormCooldown) == 0x1614); -static_assert(offsetof(Entity_Player, _controllerIndex) == 0x1618); -static_assert(offsetof(Entity_Player, _playerIndex) == 0x161c); -static_assert(offsetof(Entity_Player, _glowingHourglassIndex) == 0x1620); -static_assert(offsetof(Entity_Player, _moveDirection) == 0x1624); -static_assert(offsetof(Entity_Player, _headDirection) == 0x1628); -static_assert(offsetof(Entity_Player, _fireDirection) == 0x162c); -static_assert(offsetof(Entity_Player, _aimDirection) == 0x1630); -static_assert(offsetof(Entity_Player, _areOpposingShootDirectionsPressed) == 0x1638); -static_assert(offsetof(Entity_Player, _lastDirection) == 0x163c); -static_assert(offsetof(Entity_Player, _movementVector) == 0x1644); -static_assert(offsetof(Entity_Player, _tearsOffset) == 0x164c); -static_assert(offsetof(Entity_Player, _recentMovementVector) == 0x1654); -static_assert(offsetof(Entity_Player, _slipperyTimer) == 0x165c); -static_assert(offsetof(Entity_Player, _lastVelocity) == 0x1660); -static_assert(offsetof(Entity_Player, _lastDamageSource) == 0x167c); -static_assert(offsetof(Entity_Player, _lastDamageSourceVariant) == 0x1680); -static_assert(offsetof(Entity_Player, _lastDamageSpawnerType) == 0x1684); -static_assert(offsetof(Entity_Player, _lastDamageSpawnerVariant) == 0x1688); -static_assert(offsetof(Entity_Player, _lastDamageFlags) == 0x16a8); -static_assert(offsetof(Entity_Player, _roomDamageTaken) == 0x16b0); -static_assert(offsetof(Entity_Player, _totalDamageTaken) == 0x16b4); -static_assert(offsetof(Entity_Player, _trinketsID) == 0x16c0); -static_assert(offsetof(Entity_Player, _collectibleCounts) == 0x16c8); -static_assert(offsetof(Entity_Player, _pillEffectUses) == 0x16d4); -static_assert(offsetof(Entity_Player, _levelEffectItems) == 0x173c); -static_assert(offsetof(Entity_Player, _smeltedTrinkets) == 0x1748); -static_assert(offsetof(Entity_Player, _voidedCollectibles) == 0x1754); -static_assert(offsetof(Entity_Player, _voidedPassives) == 0x1760); -static_assert(offsetof(Entity_Player, _extensionCordIndex) == 0x176c); -static_assert(offsetof(Entity_Player, _collectibleRNGs) == 0x1770); -static_assert(offsetof(Entity_Player, _trinketRNGs) == 0x177c); -static_assert(offsetof(Entity_Player, _pillRNGs) == 0x1788); -static_assert(offsetof(Entity_Player, _cardRNGs) == 0x1794); -static_assert(offsetof(Entity_Player, _pocketSlots) == 0x17a0); -static_assert(offsetof(Entity_Player, _actionHoldDrop) == 0x17c0); -static_assert(offsetof(Entity_Player, _queuedItem) == 0x17c4); -static_assert(offsetof(Entity_Player, _isHeldItemVisible) == 0x17d8); -static_assert(offsetof(Entity_Player, _playerForms) == 0x17dc); -static_assert(offsetof(Entity_Player, _playerFormsRewarded) == 0x181c); -static_assert(offsetof(Entity_Player, _postLevelInitFinished) == 0x1824); -static_assert(offsetof(Entity_Player, _canShoot) == 0x1825); -static_assert(offsetof(Entity_Player, _footprintColor1) == 0x1828); -static_assert(offsetof(Entity_Player, _footprintColor2) == 0x1854); -static_assert(offsetof(Entity_Player, _itemHoldCooldown) == 0x1884); -static_assert(offsetof(Entity_Player, _ponyCharge) == 0x1888); -static_assert(offsetof(Entity_Player, _planCKillCountdown) == 0x188c); -static_assert(offsetof(Entity_Player, _brittleBonesUpgrades) == 0x1890); -static_assert(offsetof(Entity_Player, _headColor) == 0x1894); -static_assert(offsetof(Entity_Player, _bodyColor) == 0x1898); -static_assert(offsetof(Entity_Player, _strengthMaxHearts) == 0x18a0); -static_assert(offsetof(Entity_Player, _epiphoraCharge) == 0x18a4); -static_assert(offsetof(Entity_Player, _deadEyeCharges) == 0x18b0); -static_assert(offsetof(Entity_Player, _deadEyeMisses) == 0x18b4); -static_assert(offsetof(Entity_Player, _mawOfTheVoidChargeTimer) == 0x18bc); -static_assert(offsetof(Entity_Player, _coopBabyBuffTimers) == 0x18c0); -static_assert(offsetof(Entity_Player, _imExcitedSpeedupCountdown) == 0x18e8); -static_assert(offsetof(Entity_Player, _megaBlastDuration) == 0x18f4); -static_assert(offsetof(Entity_Player, _peeBurstCooldown) == 0x18f8); -static_assert(offsetof(Entity_Player, _maxPeeBurstCooldown) == 0x18fc); -static_assert(offsetof(Entity_Player, _bladderCharge) == 0x1900); -static_assert(offsetof(Entity_Player, _maxBladderCharge) == 0x1904); -static_assert(offsetof(Entity_Player, _isUrethraBlocked) == 0x1908); -static_assert(offsetof(Entity_Player, _nextUrethraBlockFrame) == 0x190c); -static_assert(offsetof(Entity_Player, _friendBallEnemy) == 0x1910); -static_assert(offsetof(Entity_Player, _purityState) == 0x192c); -static_assert(offsetof(Entity_Player, _immaculateConceptionState) == 0x1930); -static_assert(offsetof(Entity_Player, _cambionConceptionState) == 0x1934); -static_assert(offsetof(Entity_Player, _conceptionFamiliarFlags) == 0x1938); -static_assert(offsetof(Entity_Player, _d8DamageModifier) == 0x193c); -static_assert(offsetof(Entity_Player, _d8SpeedModifier) == 0x1940); -static_assert(offsetof(Entity_Player, _d8RangeModifier) == 0x1944); -static_assert(offsetof(Entity_Player, _d8FireDelayModifier) == 0x1948); -static_assert(offsetof(Entity_Player, _goldenHearts) == 0x194c); -static_assert(offsetof(Entity_Player, _bodyAngle) == 0x1ae4); -static_assert(offsetof(Entity_Player, _flashCountdown) == 0x1ae8); -static_assert(offsetof(Entity_Player, _babySkin) == 0x1aec); -static_assert(offsetof(Entity_Player, _hasBabyRoomShield) == 0x1b10); -static_assert(offsetof(Entity_Player, _isGlitchBaby) == 0x1b18); -static_assert(offsetof(Entity_Player, _moveToTarget) == 0x1b1c); -static_assert(offsetof(Entity_Player, _delayedSfxId) == 0x1b24); -static_assert(offsetof(Entity_Player, _delayedSfxVolume) == 0x1b28); -static_assert(offsetof(Entity_Player, _delayedSfxDelay) == 0x1b2c); -static_assert(offsetof(Entity_Player, _delayedSfxFrameDelay) == 0x1b30); -static_assert(offsetof(Entity_Player, _movingBoxContents) == 0x1d7c); -static_assert(offsetof(Entity_Player, _boneHearts) == 0x1d88); -static_assert(offsetof(Entity_Player, _boneHeartsMask) == 0x1d8c); -static_assert(offsetof(Entity_Player, _hallowedGroundCountdown) == 0x1d90); -static_assert(offsetof(Entity_Player, _damageMultiplierStacks) == 0x1d94); -static_assert(offsetof(Entity_Player, _lastDamageMultiplierStacks) == 0x1d96); -static_assert(offsetof(Entity_Player, _subPlayer) == 0x1d98); -static_assert(offsetof(Entity_Player, _forgottenBody) == 0x1d9c); -static_assert(offsetof(Entity_Player, _brokenHearts) == 0x1da0); -static_assert(offsetof(Entity_Player, _rottenHearts) == 0x1da4); -static_assert(offsetof(Entity_Player, _effectiveSoulCharge) == 0x1da8); -static_assert(offsetof(Entity_Player, _effectiveBloodCharge) == 0x1dac); -static_assert(offsetof(Entity_Player, _urnSouls) == 0x1dd0); -static_assert(offsetof(Entity_Player, _numGigaBombs) == 0x1dd4); -static_assert(offsetof(Entity_Player, _pendingWisps) == 0x1ddc); -static_assert(offsetof(Entity_Player, _history) == 0x1dec); -static_assert(offsetof(Entity_Player, _inventory) == 0x1e00); -static_assert(offsetof(Entity_Player, _contactHitList) == 0x1e40); -static_assert(offsetof(Entity_Player, _userProfile) == 0x1e4c); -static_assert(offsetof(Entity_Player, _afterImageFrames) == 0x1e54); -static_assert(offsetof(Entity_Player, _twinPlayer) == 0x1e68); -static_assert(offsetof(Entity_Player, _backupPlayer) == 0x1e6c); -static_assert(offsetof(Entity_Player, _heightVelocity) == 0x1e70); -static_assert(offsetof(Entity_Player, _redStewBonusDuration) == 0x1e74); -static_assert(offsetof(Entity_Player, _salvationEffect) == 0x1e80); -static_assert(offsetof(Entity_Player, _marsUnk1) == 0x1e8c); -static_assert(offsetof(Entity_Player, _marsCooldown) == 0x1e90); -static_assert(offsetof(Entity_Player, _marsUnk2) == 0x1e94); -static_assert(offsetof(Entity_Player, _marsUnkBool) == 0x1e98); -static_assert(offsetof(Entity_Player, _marsLastTapDirection) == 0x1e9c); -static_assert(offsetof(Entity_Player, _marsTapFrames) == 0x1ea0); -static_assert(offsetof(Entity_Player, _poisonDamageFrames) == 0x1ea8); -static_assert(offsetof(Entity_Player, _astralProjectionBody) == 0x1eac); -static_assert(offsetof(Entity_Player, _rockBottomMoveSpeed) == 0x1eb0); -static_assert(offsetof(Entity_Player, _rockBottomMaxFireDelay) == 0x1eb4); -static_assert(offsetof(Entity_Player, _rockBottomDamage) == 0x1eb8); -static_assert(offsetof(Entity_Player, _rockBottomTearRange) == 0x1ebc); -static_assert(offsetof(Entity_Player, _rockBottomShotSpeed) == 0x1ec0); -static_assert(offsetof(Entity_Player, _rockBottomLuck) == 0x1ec4); -static_assert(offsetof(Entity_Player, _reverseEmpressMaxHearts) == 0x1ecc); -static_assert(offsetof(Entity_Player, _reverseChariotMoveCooldown) == 0x1ed0); -static_assert(offsetof(Entity_Player, _reverseSunBoneHearts) == 0x1ed4); -static_assert(offsetof(Entity_Player, _revelationChargeTimer) == 0x1edc); -static_assert(offsetof(Entity_Player, _montezumaChargeTimer) == 0x1ee0); -static_assert(offsetof(Entity_Player, _montezumaLaser) == 0x1ee4); -static_assert(offsetof(Entity_Player, _jupiterCharge) == 0x1ee8); -static_assert(offsetof(Entity_Player, _holyMantleStacks) == 0x1eec); -static_assert(offsetof(Entity_Player, _ductTapeMode) == 0x1ef0); -static_assert(offsetof(Entity_Player, _maggyHealthDrainCooldown) == 0x1ef4); -static_assert(offsetof(Entity_Player, _maggySwingCooldown) == 0x1ef8); -static_assert(offsetof(Entity_Player, _jellyBellyBounceTimer) == 0x1efc); -static_assert(offsetof(Entity_Player, _forgottenBodyRoomIdx) == 0x1f08); -static_assert(offsetof(Entity_Player, _forgottenBodyPos) == 0x1f0c); -static_assert(offsetof(Entity_Player, _echoChamberItems) == 0x1f18); -static_assert(offsetof(Entity_Player, _suplexState) == 0x1f2c); -static_assert(offsetof(Entity_Player, _suplexAimCountdown) == 0x1f30); -static_assert(offsetof(Entity_Player, _suplexTargetPos) == 0x1f34); -static_assert(offsetof(Entity_Player, _suplexLandPos) == 0x1f3c); -static_assert(offsetof(Entity_Player, _bagOfCraftingContent) == 0x1f44); -static_assert(offsetof(Entity_Player, _bagOfCraftingOutput) == 0x1f4c); -static_assert(offsetof(Entity_Player, _poopMana) == 0x1f54); -static_assert(offsetof(Entity_Player, _poopSpellQueue) == 0x1f58); -static_assert(offsetof(Entity_Player, _bagOfCraftingHoldFrames) == 0x1f78); -static_assert(offsetof(Entity_Player, _eveSumptoriumCharge) == 0x1f7c); -static_assert(offsetof(Entity_Player, _itemWispsList) == 0x1f80); -static_assert(offsetof(Entity_Player, _forgottenBHeight) == 0x1f88); -static_assert(offsetof(Entity_Player, _forgottenBHeightVelocity) == 0x1f8c); -static_assert(offsetof(Entity_Player, _itemCards) == 0x1fa4); -static_assert(offsetof(Entity_Player, _roomTemporaryCollectibles) == 0x1fb0); -static_assert(offsetof(Entity_Player, _modelingClayEffect) == 0x1fb8); -static_assert(offsetof(Entity_Player, _keepersSackBonus) == 0x1fbc); -static_assert(offsetof(Entity_Player, _darkEsau) == 0x1fc0); -static_assert(offsetof(Entity_Player, _isLevelStartPending) == 0x1fc4); -static_assert(offsetof(Entity_Player, _proceduralItems) == 0x1fc8); -static_assert(offsetof(Entity_Player, _extraCollectibleCounts) == 0x1fd4); -static_assert(offsetof(Entity_Player, _extraTrinketCounts) == 0x1fe0); -static_assert(offsetof(Entity_Player, _darkArtsBlastPending) == 0x2004); -static_assert(offsetof(Entity_Player, _darkArtsDamage) == 0x2008); -static_assert(offsetof(Entity_Player, _darkArtsLastSnare) == 0x200c); -static_assert(offsetof(Entity_Player, _darkArtsHitList) == 0x2010); -static_assert(offsetof(Entity_Player, _shadowImage) == 0x201c); -static_assert(offsetof(Entity_Player, _grantedCollectibleCountdown) == 0x2024); -static_assert(offsetof(Entity_Player, _grantedCollectibleFlags) == 0x2028); -static_assert(offsetof(Entity_Player, _hasCurseMistEffect) == 0x202c); -static_assert(offsetof(Entity_Player, _consumablesBackup) == 0x2030); -static_assert(offsetof(Entity_Player, _curseMistFamiliars) == 0x2050); -static_assert(offsetof(Entity_Player, _curseMistRedHearts) == 0x205c); -static_assert(offsetof(Entity_Player, _curseMistPocketSlots) == 0x2060); -static_assert(offsetof(Entity_Player, _curseMistTrinkets) == 0x2080); -static_assert(offsetof(Entity_Player, _minecartOffset) == 0x2088); -static_assert(offsetof(Entity_Player, _wildCardItemType) == 0x2090); -static_assert(offsetof(Entity_Player, _wildCardItem) == 0x2094); -static_assert(offsetof(Entity_Player, _wildCardVarData) == 0x2098); -static_assert(offsetof(Entity_Player, _samsonBerserkCharge) == 0x209c); -static_assert(offsetof(Entity_Player, _ibsCharge) == 0x20a0); -static_assert(offsetof(Entity_Player, _isCoopGhost) == 0x20a9); -static_assert(offsetof(Entity_Player, _ghostPocketSlots) == 0x20ac); -static_assert(offsetof(Entity_Player, _ghostTrinkets) == 0x20cc); -static_assert(offsetof(Entity_Player, _playerHUD) == 0x20d4); -static_assert(offsetof(Entity_Player, _greedResetCollectibles) == 0x20dc); -static_assert(offsetof(Entity_Player, _hasUnlistedRestoreState) == 0x20e8); -static_assert(offsetof(Entity_Player, _unlistedRestoreState) == 0x20ec); -static_assert(offsetof(Entity_Player, _replacedPlayer) == 0x26c8); -static_assert(sizeof(Entity_Player) == 0x2f00); - -struct Entity_Projectile { // : Entity (flattened) - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x4]; - float _height; // Planetoid Blow resets it to -23; BACKSPLIT children copy it (Entity_Projectile::Update 00654686) - float _fallingSpeed; // Planetoid shot/Blow set 0 (ENTITY_SWARMER 00518e20) - float _fallingAccel; // setter 00444c90; Planetoid -.095/-.085, BACKSPLIT children -.04 - float _damage; // Lua EntityProjectile.Damage 0085e360 returns this+0x41c - float _scale; // Lua EntityProjectile.Scale (folded Entity_Tear::Scale 00557cd0) returns this+0x420; AddScale 0085e320 adds to it; Init sets 1.0; Update multiplies shadow size by it - float _homingStrength; // Lua EntityProjectile.HomingStrength (folded Entity_Tear::BaseScale 0060ccb0) returns this+0x424; Init 00652b90 sets 1.0 - float _curvingStrength; // Lua EntityProjectile.CurvingStrength 004d3060 returns this+0x428; Init 00652b90 sets 0.015 - float _acceleration; // setter 004aad70; ACCELERATE multiplies velocity by it a tick (00659a62) - float _orbitDistance; // orbit target distance R in the ORBIT_CW/CCW steering (Planetoid 80, Blow 0) - uint8_t _pad_0x434[0x4]; - uint64_t _projectileFlags; // Entity_Projectile::Update tests its bits (0x200000 SINE_VELOCITY 00659527, 0x400000 MEGA_WIGGLE 0065966c, 0x800000 SAWTOOTH_WIGGLE 0065976e, 0x40000/0x80000 CURVE_LEFT/RIGHT 00658ea2); FireProjectiles ORs ProjectileParams.BulletFlags in - bool _isRenderedAtGround; // ? Entity_Projectile::Render 0065cb60: when set, subtracts _height from _posOffset.y before rendering and adds it back after; ctor/Init zero it, no writer found - uint8_t _pad_0x441[0x3]; - int _animKey; // Entity_Projectile::Update 00653070 caches the animation it last played (size index 0..12, or 100/200/.../1000 per variant) and re-plays only when it changes; Init 00652b90 sets -1 to force the first play - int _wiggleFrameOffset; // Entity_Projectile::Update 006595f3 / 006596a9 add it to the +0x3a4 update time for the WIGGLE and MEGA_WIGGLE phase (ProjectileParams +0x7c WiggleFrameOffset; the red Mega Maw adds 2 a ring) - uint8_t _pad_0x44c[0x4]; - uint64_t _changeFlags; - float _changeVelocity; // Lua EntityProjectile.ChangeVelocity (folded Entity_Tear::Rotation 0060ccc0) returns this+0x458; Init zeroes it - int _changeTimeout; - uint8_t _pad_0x460[0x18]; -}; -static_assert(offsetof(Entity_Projectile, _damageEvents) == 0x8); -static_assert(offsetof(Entity_Projectile, _pendingDamage) == 0x14); -static_assert(offsetof(Entity_Projectile, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity_Projectile, _index) == 0x20); -static_assert(offsetof(Entity_Projectile, _collisionIndex) == 0x24); -static_assert(offsetof(Entity_Projectile, _type) == 0x28); -static_assert(offsetof(Entity_Projectile, _variant) == 0x2c); -static_assert(offsetof(Entity_Projectile, _subtype) == 0x30); -static_assert(offsetof(Entity_Projectile, _spawnerType) == 0x34); -static_assert(offsetof(Entity_Projectile, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity_Projectile, _sprite) == 0x48); -static_assert(offsetof(Entity_Projectile, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity_Projectile, _spriteScale) == 0xe4); -static_assert(offsetof(Entity_Projectile, _isFlipX) == 0x148); -static_assert(offsetof(Entity_Projectile, _shadowSize) == 0x15c); -static_assert(offsetof(Entity_Projectile, _shadowOffset) == 0x160); -static_assert(offsetof(Entity_Projectile, _flags) == 0x168); -static_assert(offsetof(Entity_Projectile, _valid) == 0x170); -static_assert(offsetof(Entity_Projectile, _visible) == 0x171); -static_assert(offsetof(Entity_Projectile, _exists) == 0x172); -static_assert(offsetof(Entity_Projectile, _dead) == 0x173); -static_assert(offsetof(Entity_Projectile, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity_Projectile, _isInterpolating) == 0x175); -static_assert(offsetof(Entity_Projectile, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity_Projectile, _removedByFactory) == 0x177); -static_assert(offsetof(Entity_Projectile, _collisionPoints) == 0x178); -static_assert(offsetof(Entity_Projectile, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity_Projectile, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity_Projectile, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity_Projectile, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity_Projectile, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity_Projectile, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity_Projectile, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity_Projectile, _colorParams) == 0x1ac); -static_assert(offsetof(Entity_Projectile, _color) == 0x1b8); -static_assert(offsetof(Entity_Projectile, _splatColor) == 0x1e4); -static_assert(offsetof(Entity_Projectile, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity_Projectile, _damageCountdown) == 0x214); -static_assert(offsetof(Entity_Projectile, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity_Projectile, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity_Projectile, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity_Projectile, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity_Projectile, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity_Projectile, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity_Projectile, _fearCountdown) == 0x230); -static_assert(offsetof(Entity_Projectile, _burnCountdown) == 0x234); -static_assert(offsetof(Entity_Projectile, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity_Projectile, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity_Projectile, _charmSource) == 0x240); -static_assert(offsetof(Entity_Projectile, _entityRef2) == 0x268); -static_assert(offsetof(Entity_Projectile, _entityRef3) == 0x290); -static_assert(offsetof(Entity_Projectile, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity_Projectile, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity_Projectile, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity_Projectile, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity_Projectile, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity_Projectile, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity_Projectile, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity_Projectile, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity_Projectile, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity_Projectile, _iceCountdown) == 0x300); -static_assert(offsetof(Entity_Projectile, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity_Projectile, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity_Projectile, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity_Projectile, _pausePosition) == 0x314); -static_assert(offsetof(Entity_Projectile, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity_Projectile, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity_Projectile, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity_Projectile, _spawnFrame) == 0x328); -static_assert(offsetof(Entity_Projectile, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity_Projectile, _config) == 0x330); -static_assert(offsetof(Entity_Projectile, _targetPosition) == 0x334); -static_assert(offsetof(Entity_Projectile, _pos) == 0x33c); -static_assert(offsetof(Entity_Projectile, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity_Projectile, _posOffset) == 0x34c); -static_assert(offsetof(Entity_Projectile, _renderZOffset) == 0x354); -static_assert(offsetof(Entity_Projectile, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity_Projectile, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity_Projectile, _velocity) == 0x360); -static_assert(offsetof(Entity_Projectile, _baseFriction) == 0x368); -static_assert(offsetof(Entity_Projectile, _friction) == 0x36c); -static_assert(offsetof(Entity_Projectile, _size) == 0x370); -static_assert(offsetof(Entity_Projectile, _sizeMulti) == 0x374); -static_assert(offsetof(Entity_Projectile, _mass) == 0x37c); -static_assert(offsetof(Entity_Projectile, _health) == 0x380); -static_assert(offsetof(Entity_Projectile, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity_Projectile, _collisionDamage) == 0x388); -static_assert(offsetof(Entity_Projectile, _prevPosition) == 0x38c); -static_assert(offsetof(Entity_Projectile, _prevVelocity) == 0x394); -static_assert(offsetof(Entity_Projectile, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity_Projectile, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity_Projectile, _updateTime) == 0x3a4); -static_assert(offsetof(Entity_Projectile, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity_Projectile, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity_Projectile, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity_Projectile, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity_Projectile, _parent) == 0x3bc); -static_assert(offsetof(Entity_Projectile, _child) == 0x3c0); -static_assert(offsetof(Entity_Projectile, _target) == 0x3c4); -static_assert(offsetof(Entity_Projectile, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity_Projectile, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity_Projectile, _minecart) == 0x3d4); -static_assert(offsetof(Entity_Projectile, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity_Projectile, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity_Projectile, _initSeed) == 0x3ec); -static_assert(offsetof(Entity_Projectile, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity_Projectile, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity_Projectile, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity_Projectile, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity_Projectile, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity_Projectile, _luaBridgeRef) == 0x408); -static_assert(offsetof(Entity_Projectile, _height) == 0x410); -static_assert(offsetof(Entity_Projectile, _fallingSpeed) == 0x414); -static_assert(offsetof(Entity_Projectile, _fallingAccel) == 0x418); -static_assert(offsetof(Entity_Projectile, _damage) == 0x41c); -static_assert(offsetof(Entity_Projectile, _scale) == 0x420); -static_assert(offsetof(Entity_Projectile, _homingStrength) == 0x424); -static_assert(offsetof(Entity_Projectile, _curvingStrength) == 0x428); -static_assert(offsetof(Entity_Projectile, _acceleration) == 0x42c); -static_assert(offsetof(Entity_Projectile, _orbitDistance) == 0x430); -static_assert(offsetof(Entity_Projectile, _projectileFlags) == 0x438); -static_assert(offsetof(Entity_Projectile, _isRenderedAtGround) == 0x440); -static_assert(offsetof(Entity_Projectile, _animKey) == 0x444); -static_assert(offsetof(Entity_Projectile, _wiggleFrameOffset) == 0x448); -static_assert(offsetof(Entity_Projectile, _changeFlags) == 0x450); -static_assert(offsetof(Entity_Projectile, _changeVelocity) == 0x458); -static_assert(offsetof(Entity_Projectile, _changeTimeout) == 0x45c); -static_assert(sizeof(Entity_Projectile) == 0x478); - -struct Entity_Slot { // : Entity (flattened) - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x144]; -}; -static_assert(offsetof(Entity_Slot, _damageEvents) == 0x8); -static_assert(offsetof(Entity_Slot, _pendingDamage) == 0x14); -static_assert(offsetof(Entity_Slot, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity_Slot, _index) == 0x20); -static_assert(offsetof(Entity_Slot, _collisionIndex) == 0x24); -static_assert(offsetof(Entity_Slot, _type) == 0x28); -static_assert(offsetof(Entity_Slot, _variant) == 0x2c); -static_assert(offsetof(Entity_Slot, _subtype) == 0x30); -static_assert(offsetof(Entity_Slot, _spawnerType) == 0x34); -static_assert(offsetof(Entity_Slot, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity_Slot, _sprite) == 0x48); -static_assert(offsetof(Entity_Slot, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity_Slot, _spriteScale) == 0xe4); -static_assert(offsetof(Entity_Slot, _isFlipX) == 0x148); -static_assert(offsetof(Entity_Slot, _shadowSize) == 0x15c); -static_assert(offsetof(Entity_Slot, _shadowOffset) == 0x160); -static_assert(offsetof(Entity_Slot, _flags) == 0x168); -static_assert(offsetof(Entity_Slot, _valid) == 0x170); -static_assert(offsetof(Entity_Slot, _visible) == 0x171); -static_assert(offsetof(Entity_Slot, _exists) == 0x172); -static_assert(offsetof(Entity_Slot, _dead) == 0x173); -static_assert(offsetof(Entity_Slot, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity_Slot, _isInterpolating) == 0x175); -static_assert(offsetof(Entity_Slot, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity_Slot, _removedByFactory) == 0x177); -static_assert(offsetof(Entity_Slot, _collisionPoints) == 0x178); -static_assert(offsetof(Entity_Slot, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity_Slot, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity_Slot, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity_Slot, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity_Slot, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity_Slot, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity_Slot, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity_Slot, _colorParams) == 0x1ac); -static_assert(offsetof(Entity_Slot, _color) == 0x1b8); -static_assert(offsetof(Entity_Slot, _splatColor) == 0x1e4); -static_assert(offsetof(Entity_Slot, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity_Slot, _damageCountdown) == 0x214); -static_assert(offsetof(Entity_Slot, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity_Slot, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity_Slot, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity_Slot, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity_Slot, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity_Slot, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity_Slot, _fearCountdown) == 0x230); -static_assert(offsetof(Entity_Slot, _burnCountdown) == 0x234); -static_assert(offsetof(Entity_Slot, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity_Slot, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity_Slot, _charmSource) == 0x240); -static_assert(offsetof(Entity_Slot, _entityRef2) == 0x268); -static_assert(offsetof(Entity_Slot, _entityRef3) == 0x290); -static_assert(offsetof(Entity_Slot, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity_Slot, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity_Slot, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity_Slot, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity_Slot, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity_Slot, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity_Slot, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity_Slot, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity_Slot, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity_Slot, _iceCountdown) == 0x300); -static_assert(offsetof(Entity_Slot, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity_Slot, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity_Slot, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity_Slot, _pausePosition) == 0x314); -static_assert(offsetof(Entity_Slot, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity_Slot, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity_Slot, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity_Slot, _spawnFrame) == 0x328); -static_assert(offsetof(Entity_Slot, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity_Slot, _config) == 0x330); -static_assert(offsetof(Entity_Slot, _targetPosition) == 0x334); -static_assert(offsetof(Entity_Slot, _pos) == 0x33c); -static_assert(offsetof(Entity_Slot, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity_Slot, _posOffset) == 0x34c); -static_assert(offsetof(Entity_Slot, _renderZOffset) == 0x354); -static_assert(offsetof(Entity_Slot, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity_Slot, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity_Slot, _velocity) == 0x360); -static_assert(offsetof(Entity_Slot, _baseFriction) == 0x368); -static_assert(offsetof(Entity_Slot, _friction) == 0x36c); -static_assert(offsetof(Entity_Slot, _size) == 0x370); -static_assert(offsetof(Entity_Slot, _sizeMulti) == 0x374); -static_assert(offsetof(Entity_Slot, _mass) == 0x37c); -static_assert(offsetof(Entity_Slot, _health) == 0x380); -static_assert(offsetof(Entity_Slot, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity_Slot, _collisionDamage) == 0x388); -static_assert(offsetof(Entity_Slot, _prevPosition) == 0x38c); -static_assert(offsetof(Entity_Slot, _prevVelocity) == 0x394); -static_assert(offsetof(Entity_Slot, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity_Slot, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity_Slot, _updateTime) == 0x3a4); -static_assert(offsetof(Entity_Slot, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity_Slot, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity_Slot, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity_Slot, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity_Slot, _parent) == 0x3bc); -static_assert(offsetof(Entity_Slot, _child) == 0x3c0); -static_assert(offsetof(Entity_Slot, _target) == 0x3c4); -static_assert(offsetof(Entity_Slot, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity_Slot, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity_Slot, _minecart) == 0x3d4); -static_assert(offsetof(Entity_Slot, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity_Slot, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity_Slot, _initSeed) == 0x3ec); -static_assert(offsetof(Entity_Slot, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity_Slot, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity_Slot, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity_Slot, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity_Slot, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity_Slot, _luaBridgeRef) == 0x408); -static_assert(sizeof(Entity_Slot) == 0x550); - -struct Entity_Tear { // : Entity (flattened) - uint8_t _pad_0x0[0x8]; - uint8_t _damageEvents[0xc]; // vector_DamageEvent; damage queued this frame: Entity::TakeDamage 006ace60 pushes {float dmg, pad, uint64 flags @+8, EntityRef @+0x10} (FUN_006b7db0); Entity::Update 006ae820 walks begin 0x8..end 0xc in 0x38-byte steps subtracting dmg from _health, then clears (0xc=0x8) - float _pendingDamage; // Entity::TakeDamage 006ace60 adds the damage (in_ECX[5] += dmg); Lua Entity.HasMortalDamage 006ad340 returns _health <= this+0x14; Entity::Update 006ae820 zeroes it - uint64_t _pendingDamageFlags; // Entity::TakeDamage 006ace60 ORs DamageFlags lo/hi into 0x18/0x1c; Entity::Update 006ae820 zeroes both; Hornfel_UpdateAI 004b92e0 tests &4 (explosion) - uint32_t _index; // Lua Entity.Index getter (folded as PathFinder::GetGridIndex 00456370) returns this+0x20 - uint32_t _collisionIndex; // EntityList::rebuild_sublists 00419e70 assigns a running index to this+0x24 for each entity with _entityCollisionClass!=0 - uint32_t _type; - uint32_t _variant; - uint32_t _subtype; - uint32_t _spawnerType; - uint32_t _spawnerVariant; - uint8_t _pad_0x3c[0xc]; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - Vector _spriteScale; - uint8_t _pad_0xec[0x5c]; - bool _isFlipX; - uint8_t _pad_0x149[0x13]; - float _shadowSize; // Entity::LoadEntityConfig 006a98b0 stores EntityConfig shadowSize here (0.015625 without config) - Vector _shadowOffset; // Entity::RenderShadowLayer 006b2000 and Entity_Player::Render 0078ca00 add this+0x160/0x164 to _pos before the 0.65 shadow-layer transform; ctor 006a8290 zeroes - uint64_t _flags; // Lua Entity.GetEntityFlags 00417420 returns this+0x168 (Add/Clear/HasEntityFlags use 0x168/0x16c); AddFreeze 006ad3c0 ORs FLAG_FREEZE 0x20 into it - bool _valid; // EntityList::AddEntity 00418500 skips if set, else pushes the entity and sets +0x170=1; EntityList::Update 004186c0 clears it when an entity stops existing; EntityFactory::Create 006f0090 picks a pool slot whose +0x170 is 0; ctor 006a8290 zeroes it - bool _visible; - bool _exists; - bool _dead; - bool _isKillOnTouch; // ? Entity_NPC::HandleCollision 006cd410 calls Kill (vtable+0x24) when set; Fly AI 00506bd0 damages itself every 4 frames when set; boss AIs (Duke, Widow, Monstro...) set it on spawned flies after clearing FLAG_APPEAR - bool _isInterpolating; // Entity::Interpolate 006b0eb0 (and Knife/Tear/NPC/Projectile Interpolate) set +0x175=1 before re-running Update; Manager::Update 00954cd0 clears it; Entity_Knife::Update / Entity_Laser::UpdateHits skip hit logic while set; Entity::Init 006a93a0 clears it - bool _isInitFlag176; // ? only written in the dump: Entity::Init 006a93a0 zeroes it (word with _removedByFactory 0x177); Entity_Pickup::Init 006e02f0 sets 1; Entity_Effect::Init 005cdb20 sets 1 for floor/random-rotation effects (variants with sortingLayer 0/z 2000, 0x61, 0x91, 0x92, 0x9b); Entity_Projectile::Update 00653070 clears it when switching to the "Flickering" anim; no reader found - bool _removedByFactory; // EntityFactory::Create 006f0090 on 'Entity pool array %s is full, overwriting' sets byte [slot+0x177]=1 (0x6f0332), calls Remove (vt+0x28) and ClearReferences (vt+0x44), then clears it; Entity_Laser::ClearReferences 0097e800 only frees child lasers when set; Init 006a93a0 zeroes 0x176/0x177 - uint8_t _collisionPoints[0xc]; // vector_Vector; Entity::SetSize 006ac2a0 clears it (0x17c=0x178) and pushes numGridCollisionPoints ellipse points (std::vector::_Emplace_reallocate, cap 0x180); LoadEntityConfig 006a98b0 picks GridCollisionClass from its size - int _entityGridCollisionClass; // Lua Entity.GridCollisionClass 00440eb0 returns this+0x184; LoadEntityConfig 006a98b0 assigns 0/3/5/6 from config - int _entityCollisionClass; - bool _collidesWithEntity; // ? EntityList::rebuild_sublists 00419e70 clears it for every entity each frame; ENTITY_WRATH 00475110 / ENTITY_POKY 00521ab0 test !_collidesWithGrid && !this (no setter found in the C) - uint8_t _pad_0x18d[0x3]; - bool _collidesWithGrid; // Lua Entity.CollidesWithGrid 00665a80 returns byte this+0x190 (400) - uint8_t _pad_0x191[0x3]; - Vector _gridCollisionVelocity; // Entity::CollideWithGrid 006a9c90 copies _velocity (0x360/0x364) into 0x194/0x198 when it hits a wall and sets _collidesWithGrid (0x190)=1 - Vector _gridCollisionNormal; // Entity::CollideWithGrid 006a9c90 writes (+-1,0)/(0,+-1) or the summed contact normal to 0x19c/0x1a0 and pushes velocity along it; Brownie/Dingle AIs use pos + normal*200 - Vector _renderPosition; // Entity::Render 006b10f0 stores the floored screen position (pos+posOffset world->screen + offset arg) at 0x1a4/0x1a8 and passes &this+0x1a4 to ANM2::Render; ctor zeroes it; Entity_Player::Render 0078b640 does the same - uint8_t _colorParams[0xc]; // vector_ColorParams; ctor 006a8290 zeroes the 3-pointer vector at 0x1ac/0x1b0/0x1b4; Entity::SetColor 006b2fa0 pushes ColorParams here when duration>=1; Entity::Update 006ae820 walks 0x3c-byte elements, decrements duration @+0x34, erases expired ones and re-applies the colour - ColorMod _color; // Entity::SetColor 006b2fa0 copies the ColorMod straight into 0x1b8..0x1e0 when duration<1 (else pushes ColorParams into the 0x1ac vector); ctor 006a8290 inits tint 1,1,1,1 rest 0 - ColorMod _splatColor; // Lua getter Entity::SplatColor returns this+0x1e4 - int _fireDamageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_FIRE (flags&2) returns 0 while in_ECX[0x84]>0, else sets it to 10; Entity::Update 006ae820 decrements it; Init 006a93a0 zeroes it - int _damageCountdown; // Entity::TakeDamage 006ace60: with DAMAGE_COUNTDOWN (flags&0x40) returns 0 while in_ECX[0x85]>0; Entity::Update 006ae820 decrements it; Entity_Familiar::HandleCollision 006261f0 only deals contact damage when <1 and Entity_Familiar::TakeDamage 0062cdc0 sets it to 0x1e - int _freezeCountdown; // Entity::AddFreeze 006ad3c0 adds duration (cap 0x78) and sets FLAG_FREEZE 0x20; Entity::Update 006ae820 decrements and clears 0x20 at 0; AddMidasFreeze 006adf40 also sets it - int _poisonCountdown; // Entity::AddPoison 006ad500 adds duration and sets FLAG_POISON 0x40; Entity::Update 006ae820 decrements, clearing 0x40 and resetting 0x320 to 2.0 at 0 - int _slowingCountdown; // Entity::AddSlowing 006ad750 adds duration and sets FLAG_SLOW 0x80; Entity::Update 006ae820 decrements it - int _charmedCountdown; // Entity::AddCharmed 006ad870 adds duration and sets FLAG_CHARM 0x100 (zeroes it when making the entity permanently friendly) - int _confusionCountdown; // Entity::AddConfusion 006add70 adds duration and sets FLAG_CONFUSION 0x200 - int _midasFreezeCountdown; // Entity::AddMidasFreeze 006adf40 only when it is 0: sets it and _freezeCountdown to duration and ORs 0x420 (FREEZE|MIDAS_FREEZE) - int _fearCountdown; // Entity::AddFear 006ae0a0 (Lua Entity:AddFear) adds duration to it under the usual boss-cooldown gate; Entity::Update 006ae820 handles it with the fear flag - int _burnCountdown; // Entity::AddBurn 006ae280 adds duration at raw +0x234 and zeroes 0x2e4 on a fresh burn; Entity::Update 006ae820 decrements it, clearing FLAG_BURN 0x1000 and resetting 0x324 to 2.0 at 0 - int _bossStatusEffectCooldown; // every Entity::Add* status function (AddFreeze 006ad3c0, AddBurn 006ae280 raw +0x238...) refuses while >0 unless ignoreBossStatusCooldown, and sets it to 0xf0 for bosses - int _shrinkCountdown; // Entity::AddShrink 006b5c10 adds duration and sets FLAG_SHRINK 0x1000000; Entity::Update 006ae820 decrements it - EntityRef _charmSource; // Entity::AddCharmed 006ad870 copies the source EntityRef (type,variant,..,flags 0x260,entity 0x264) into 0x240..0x264; ctor zeroes it like an EntityRef (ints, zero Vectors at +0x10/+0x18) - EntityRef _entityRef2; // ? ctor 006a8290 inits 0x268..0x28c exactly like the 0x240 EntityRef (4 ints 0, zero Vectors at 0x278/0x280, 2 ints 0); Entity_Player::TakeDamage 007729d0 / Update test its entity (+0x24 = 0x28c) == this. zhl _poisonDamage 0x278/_burnDamage 0x27c sit inside it and look wrong - EntityRef _entityRef3; // ? ctor 006a8290 inits 0x290..0x2b4 like the 0x240 EntityRef (zero Vectors at 0x2a0/0x2a8); zhl _depthOffset 0x2b0 sits inside it (the real DepthOffset is 0x358) - EntityRef _entityRef4; // ? ctor 006a8290 inits 0x2b8..0x2dc like the 0x240 EntityRef (zero Vectors at 0x2c8/0x2d0, ctor writes 'this->_mass' = zero-Vector y); zhl _mass 0x2d4 sits inside it (the real Mass is 0x37c) - int _poisonDamageTimer; // Entity::AddPoison 006ad500 zeroes it on a fresh poison; Entity::Update 006ae820 increments raw +0x2e0 while FLAG_POISON 0x40 and deals TakeDamage(+0x320) when it %20 == 1 - int _burnDamageTimer; // Entity::AddBurn 006ae280 zeroes raw +0x2e4 on a fresh burn; Entity::Update 006ae820 increments it while FLAG_BURN 0x1000 and deals TakeDamage(+0x324) when it %20 == 1 - int _bleedingCountdown; // Entity::AddBleeding 006ae420 adds duration under the boss-cooldown gate and sets the bleed flag; Entity::Update 006ae820 decrements it - float _bleedDamageAccumulator; // Entity::Update 006ae820: while FLAG_BLEED_OUT (hi &4) adds |pos-prevPos|*_speedMultiplier*0.02 to it, deals floor(it) (cap 10) * (stage*0.3+2.8) damage and keeps the fraction; zeroed when _bleedingCountdown ends, by Init 006a93a0 and RemoveStatusEffects 006ae630 - int _magnetizedCountdown; // Entity::Update 006ae820 decrements it and clears FLAG_MAGNETIZED (bit 51, hi 0x80000) at 0; Init 006a93a0 zeroes it - int _baitedCountdown; // Entity::AddBaited 006b7560 adds duration and sets FLAG_BAITED (bit 52, hi 0x100000); Entity::Update 006ae820 decrements and clears it - int _knockbackCountdown; // Entity::AddKnockback 006b7a80 stores duration (scaled down by mass>10) and sets the knockback flags (hi 0x8000/0x18000); Entity::Update 006ae820 decrements and clears hi 0x18000 - int _weaknessCountdown; // Entity::AddWeakness 006b77d0 adds to [ESI+0x2fc] and sets FLAG_WEAKNESS (bit 54, OR [ESI+0x16c],0x400000) - int _iceCountdown; // Entity::AddIce 006b79d0 adds duration at raw +0x300; Entity::Update 006ae820 decrements and clears FLAG_ICE (bit 50, hi 0x40000) - int _brimstoneMarkCountdown; // Entity::AddBrimstoneMark 006b78d0 adds duration at raw +0x304; Entity::Update 006ae820 decrements and clears FLAG_BRIMSTONE_MARKED (bit 56, hi 0x1000000) - Vector _knockbackDirection; // Entity::AddKnockback 006b7a80 stores the push direction here (scaled by 10/mass for heavy entities) - uint8_t _iceFrozenEffect[0x4]; // EntityPtr; ? Entity::Update 006ae820 Removes (vtable+0x28) the entity in 0x310 once flag bit 51 (ICE_FROZEN, hi 0x80000) is gone; Entity::ClearReferences 006acb60 removes and releases it - Vector _pausePosition; // Entity_NPC::Update 006c4b30: while _pauseTimer>0 it latches _pos into 0x314/0x318 (if zero) and pins _pos to it - int _pauseTimer; // Entity_NPC::Update 006c4b30: while >0 latches _pos into 0x314/0x318, pins _pos there, damps velocity 0.6 and decrements it; Init 006a93a0 zeroes it - float _poisonTickDamage; // Entity::AddPoison 006ad500 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage(this+0x320, 0x8000..) and resets it to 2.0 when poison ends; CopyStatusEffects 006a8a20 copies it - float _burnTickDamage; // Entity::AddBurn 006ae280 stores max(old, damage); Entity::Update 006ae820 deals it via TakeDamage and resets it to 2.0 when burn ends; CopyStatusEffects 006a8a20 copies it - int _spawnFrame; // Lua Entity.FrameCount 006a9c10 returns game frame - this+0x328 - int _spawnGridIndex; - uint32_t _config; // EntityConfig_Entity* // Entity::LoadEntityConfig 006a98b0 stores the EntityConfig_Entity* here; Entity_Player::Update 00782af0 resets _mass (0x37c) from config+0x44 (mass); NPC AIs spawn_gibs(config+0x60 gibFlags) - Vector _targetPosition; - Vector _pos; // Lua Entity.Position 00417290 returns this+0x33c/0x340 - Vector _preInterpolatePos; // Entity::Interpolate 006b0eb0 (and the NPC/Tear/Projectile overrides) saves _pos here before advancing it half a step - Vector _posOffset; // Lua Entity.PositionOffset 00417310 returns this+0x34c - int _renderZOffset; - float _renderDepthOffset; // Lua Entity.DepthOffset 00435d10 returns this+0x358 (zhl _depthOffset at 0x2b0 does not match this exe) - int _sortingLayer; - Vector _velocity; // Lua Entity.Velocity 004172d0 returns this+0x360/0x364 - float _baseFriction; // Entity::LoadEntityConfig 006a98b0 copies EntityConfig friction (+0x4c) here (1.0 without config); Entity_NPC::Update 006c4b30 restores _friction (0x36c) from it after Appear/regen - float _friction; // Lua Entity.Friction via binder 0087d5d0: getter 008be110 FUN_0085c050 (lua_pushnumber), setter 008be170 luaL_checknumber -> *(float*) - float _size; // Lua Entity.Size 00871f90 returns float this+0x370; Entity::SetSize 006ac2a0 writes it - Vector _sizeMulti; // Lua Entity.SizeMulti 0085dd40 returns 0x374/0x378; Entity::SetSize 006ac2a0 stores the X/Y multipliers there - float _mass; // Lua Entity.Mass getter 00431520 returns float this+0x37c (REPENTOGON/zhl_fields put _mass at 0x2d4: wrong in this exe); ai_umbilical_baby 00431be0 uses 900/(mass+50); Entity::LoadEntityConfig 006a98b0 initialises it from config+0x44 - float _health; // Lua Entity.HitPoints 00417370 returns float this+0x380 - float _maxHitPoints; // Lua Entity.MaxHitPoints 00417360 returns this+0x384 (900); LoadEntityConfig 006a98b0 = baseHP + stage*stageHP; HasFullHealth/AddHealth clamp _health to it - float _collisionDamage; // Lua Entity.CollisionDamage 005b1570 returns float this+0x388; LoadEntityConfig 006a98b0 copies config collisionDamage - Vector _prevPosition; // Entity::PreUpdate 006ae7d0 copies _pos into 0x38c/0x390; Entity::Update 006ae820 uses pos - this+0x38c as the frame's displacement - Vector _prevVelocity; // Entity::PreUpdate 006ae7d0 copies _velocity into 0x394/0x398 - float _speedMultiplier; // Entity::Update 006ae820 adds it to the 0x3a4 update clock each frame and scales sprite playback speed by it; Entity::AddVelocity 00431450 uses it; Init 006a93a0 sets 1.0 - float _prevUpdateTime; // Entity::Update 006ae820 sets 0x3a0 = 0x3a4 then 0x3a4 += _speedMultiplier (unless flag 0x4000); Entity::GetIntervalTicks 006ac760 and the 'GetHitPointsLost' 00435db0 helper return (int)0x3a4-(int)0x3a0 ticks elapsed - float _updateTime; // Entity::Update 006ae820 adds _speedMultiplier to it each update (time-scaled frame counter); AIs subtract (int)0x3a4-(int)0x3a0 from their cooldowns - uint8_t _pad_0x3a8[0x4]; - float _slowingAmount; // Entity::AddSlowing 006ad750 stores its float amount arg here; Entity_Player::Update 00782af0 scales _friction (0x36c) by it while FLAG_SLOW 0x80; Entity_NPC::trigger_kill_item_effects 006d5400 passes it on to AddSlowing of nearby enemies; Init 006a93a0 sets 0.9 - bool _isInvicible; // Lua Entity.IsInvincible 005b1580 returns byte this+0x3b0 - uint8_t _pad_0x3b1[0x3]; - float _shrinkStatus1; // Entity::AddShrink 006b5c10 calls SetSize(config size * it); Entity::Update 006ae820 lerps it toward _shrinkStatus2; Init 006a93a0 sets 1.0 - float _shrinkStatus2; // Entity::AddShrink 006b5c10 sets the shrink target 0.333 here; Entity::Update 006ae820 lerps _shrinkStatus1 toward it; Init 006a93a0 sets 1.0 - uint8_t _parent[0x4]; // EntityPtr - uint8_t _child[0x4]; // EntityPtr - uint8_t _target[0x4]; // EntityPtr - uint8_t _spawnerEntity[0x4]; // EntityPtr - uint8_t _entityPtrReferrers[0x8]; // std_multiset_uint; Entity::ClearReferences 006acb60 walks the tree at 0x3cc (head node new(0x14), size 0x3d0) nulling every EntityPtr* stored in it; EntityPtr assignments go through std::multiset::insert/erase - uint8_t _minecart[0x4]; // EntityPtr; Entity::GiveMinecart 006b7be0 spawns a 965.0 minecart and stores it in this EntityPtr (multiset ref); ctor 006a8290 nulls it - uint8_t _hitEffect[0x4]; // EntityPtr; ? Entity::TakeDamage 006ace60 Removes the old one and stores a freshly spawned effect 1000.160 in in_ECX[0xf6]; ClearReferences 006acb60 releases it - RNG _dropRNG; - uint32_t _initSeed; - int _holdCountdown; // Entity_NPC::hold_set 006b5de0 sets max(it, ticks) with the spot in 0x3f4 (Emergency Contact); Entity::Update 006ae820 decrements it; NPC::Update 006c4b30 kills friction and pins velocity while >0 - Vector _holdPosition; // Entity_NPC::hold_set 006b5de0 writes the spot to 0x3f4/0x3f8; Entity_NPC::Update 006c4b30 assigns it while _holdCountdown>0 - int _pitfallState; // Entity_Bomb::Update 006a24d0: !=0 slows it and 1->2 when the anim ends then removes; Entity_Player::GetDeathAnimName 007828f0 picks "HoleDeath" when != 0; NpcAI::ENTITY_PITFALL uses it - int _pitfallTimer; // FUN_007b9b50 (player pitfall update) increments it in _pitfallState 2 and climbs out (state 3) after 0x27 frames on input or forced past 0x77; Entity_Player::AnimatePitfallIn 007abc20, GridEntity_Pit::PostInit 00714320, ENTITY_ROTGUT_face 0057bec0, Entity_Player::room_enter 007a6c50 and Init 006a93a0 zero it next to _pitfallState (0x3fc) - float _scoreMultiplier; // ? award_fly_kill_points 009e5c00 (also called by Entity_Player::trigger_npc_death) multiplies the kill points ceil(f(maxHP)*5) by entity+0x404; ctor 006a8290/Init 006a93a0 set 1.0, Init sets 0 for Uriel/Gabriel (271/272) when the Game state flag for them is set; Entity_Pickup::Init 006e02f0 sets 0 on the fly it spawns; Entity_NPC split 006d97e0 gives children half the parent value - uint32_t _luaBridgeRef; // LuaBridgeRef* // Lua Entity.GetData 006b5e60 lazily allocates {lua_State,luaL_ref} into this+0x408; ctor 006a8290 nulls it - uint8_t _pad_0x40c[0x4]; - float _height; // Lua EntityTear.Height getter 00431750 returns this+0x410 - float _fallingSpeed; // Lua EntityTear.FallingSpeed getter 00456440 returns this+0x414 - float _fallingAccel; // Lua EntityTear.FallingAcceleration getter 00435e50 returns this+0x418 - float _homingFriction; - float _fScale; // Lua EntityTear.Scale 00557cd0 returns this+0x420 - float _baseScale; // Entity_Tear::SetScale 00676120 writes it together with _fScale (clamped >=0.01); HandleCollision 00673660 rescales from it (SetScale(dmgLeft*base/dmg), spawn scale base*1.3); Init 006660a0 sets 1.0 (REPENTOGON names 0x424 _baseScale too) - BitSet128 _tearFlags; // Lua EntityTear.TearFlags 004177c0 returns the 4 dwords 0x428..0x434 - int _waitFrames; - Vector _continueVelocity; - uint8_t _hitList[0xc]; // std_vector_uint; Entity_Tear::HandleCollision 00673660 does LEA ECX,[ESI+0x444] then EntityList::HitListContains 00431640 (binary search of GetHitListIndex) and sorted insert 00431570; ctor 00665cf0 zeroes 0x444..0x44c, Init 006660a0 sets end=begin - int _tearIdx; // Lua EntityTear.TearIndex 004aade0 returns this+0x450 - float _baseDamage; // Entity_Tear::SetCollisionDamage 00675fa0 writes the arg to _collisionDamage and +0x454; Init 006660a0 sets 3.5 like _collisionDamage (REPENTOGON names 0x454 _baseDamage too) - float _rotation; // Lua EntityTear.Rotation 0060ccc0 returns this+0x458 - int _scaleAnimNum; // Entity_Tear::ResetSpriteScale 00677780 recomputes the RegularTear%d/BloodTear%d anim number from scale and replays only when it differs from +0x45c; Entity_Tear::Init 006660a0 sets -1 - float _knockbackMultiplier; - float _deadEyeIntensity; // Entity_Tear::SetDeadEyeIntensity 00679e80 writes this+0x464 - bool _multidimensionalTouched; // Entity_Familiar::Update 0061da10 (Multidimensional Baby) reads tear+0x468 via 0060cd60, sets it via 0060cd70 before Entity_Tear::MakeMultidimensionalCopy 0067a190 (which copies it) - bool _prismTouched; // Entity_Familiar::Update 0061da10 (Angelic Prism) skips tears with +0x469 set (0060cd80) and sets it on the split copies (0060cd90) - bool _isFireSoundPending; // Entity_Tear::Init 006660a0 sets it to 1; Entity_Tear::Update 006670f0 calls play_fire_sound() once and clears it - uint8_t _pad_0x46b[0x1]; - short _popBounceCount; // Entity_Tear::Update 006670f0 increments it on both tears on a tear-tear bounce, HandleCollision 00673660 increments it when TEAR_POP (bit 58, mask 0xc345b0) is set; Update keeps bouncing only while < 9; Init zeroes it - uint8_t _pad_0x46e[0x2]; - int _hitCount; // Entity_Tear::HandleCollision 00673660 tests ==0 for first-hit effects then increments it on every enemy hit; Init zeroes it - uint32_t _deathFlags; // Entity_Tear::Update 006670f0 ORs a reason into it whenever it sets _dead (+0x173): 1 grid hit, 2 grid collision type 4, 4 hit the floor, 0x10 damage depleted, 0x20, 0x40 timeout/forced die; tests ==4 for the hydro-bounce revive; Init zeroes it - uint32_t _stickTarget; // Entity* // Lua EntityTear.StickTarget via binder 00880880: getter 008be4b0 UserdataPtr Entity key c8297a, setter stores pointer - Vector _stickDiff; // Lua EntityTear.StickDiff via binder 00880710: getter 008be370 UserdataValue 8-byte copy - int _stickTimer; // Lua EntityTear.StickTimer via binder 008805a0: getter 008be2b0 FUN_0085bfd0 signed dword, setter checkinteger dword - uint8_t _techZeroLaser[0x4]; // EntityPtr; Entity_Tear::Update 006670f0 (TEAR_LASER bit 57, mask 0xc345a0): Entity_Laser::ShootAngle result stored here, repositioned between the tears, Remove()d (vtable+0x28) when the linked tear dies or >350 apart; ClearReferences 006666c0 removes it - uint8_t _techZeroTarget[0x4]; // EntityPtr; Entity_Tear::Update 006670f0 (TEAR_LASER bit 57): nearest other tear (QueryRadius, type 2) whose +0x48c is not this; laser +0x488 spans to it; Interpolate 00679400 reads it; ClearReferences 006666c0 resets it - uint8_t _laserShotLaser[0x4]; // EntityPtr; Entity_Tear::Update 006670f0 (TEAR_LASERSHOT bit 60, mask 0xc345d0) spawns a laser via Entity_Laser::ShootAngle along the tear's (continue)velocity and keeps it here; without the flag it is Remove()d; ClearReferences 006666c0 removes it - uint8_t _linkPrev[0x4]; // EntityPtr; Entity_Tear::apply_link_spring_forces 0067aaf0 springs toward +0x494 and +0x498 (rest length 10); link setter 0067ae30 joins prev/next; ClearReferences 006666c0 relinks prev<->next (EntityPtr set 0067dac0) when both are tears - uint8_t _linkNext[0x4]; // EntityPtr; see _linkPrev: apply_link_spring_forces 0067aaf0, 0067ae30, ClearReferences 006666c0; Init 006660a0 resets both - uint8_t _attachedEffect[0x10]; // EntityPtr; ? Entity_Tear::Update 006670f0 spawns (Game::Spawn) an entity for several tear-flag cases into +0x49c, sets its parent/color and scales it with _fScale every frame; ClearReferences 006666c0 Remove()s it - ANM2 _tearHaloANM2; // Entity_Tear::SetTearFlags 00676150 loads gfx/TearHalo.anm2 into this+0x4ac - ANM2 _tearEffectANM2; // Entity_Tear::SetTearFlags 00676150 loads LittleHorn/Mysterious/DarkMatter/FireMind/JacobsLadder TearEffect anm2s into this+0x5c0 - ANM2 _deadEyeANM2; // Entity_Tear::SetDeadEyeIntensity 00679e80 loads gfx/DeadEyeTearEffect.anm2 into this+0x6d4 - bool _canTriggerStreakEnd; // Lua EntityTear.CanTriggerStreakEnd via binder 00880a00: getter 008be5e0 lua_pushboolean(byte), setter 008be640 lua_toboolean -> bool - bool _isHovering; // ? Entity_Tear::play_fire_sound 00666d40 sets it (and triples a negative _fallingSpeed) when TEAR_ORBIT (dword0 bit16, mask c34b60) is set and clears it with the HYDROBOUNCE mask c345e0; height helper 00676020 treats the tear as gravity-less when it is set or _fallingAccel <= 0.001 - bool _isFireSoundMuted; // Entity_Tear::play_fire_sound 00666d40 skips the fire sound while it is set; Entity_Knife::UpdateSwingHits 009688d0 sets it on tears it spawns, setter 00753720 (called from Entity_Player::Update) too; Init 006660a0 zeroes it - uint8_t _pad_0x7eb[0x1]; - Vector _posDisplacement; - Vector _parentOffset; // Lua EntityTear.ParentOffset via binder 00880710: getter 008be370 UserdataValue 8-byte copy - int _holdTimer; // Entity_Tear::Update 006670f0: while >0 counts down, pins the tear to parent(+0x3bc) pos + +0x800 with zero velocity and bobs height ±0.5 per 15 frames; on expiry restores velocity from +0x808; Interpolate 00679400 does the same pin - Vector _holdOffset; // Entity_Tear::Update 006670f0 / Interpolate 00679400 set pos = parent pos + this+0x800/+0x804 while _holdTimer (+0x7fc) > 0; Init zeroes it - Vector _holdVelocity; // Entity_Tear::Update 006670f0 copies +0x808/+0x80c into velocity when _holdTimer (+0x7fc) reaches 0 - Vector _orbitVelocity; // ? Entity_Tear::Update 006670f0 subtracts +0x810 from _velocity (Vector -= at 66a93a), recomputes it for the orbit (around _spawnerEntity/_parent or _targetPosition) and assigns it (66abde), zeroes it otherwise; Init 006660a0 sets zero vector - float _orbitAngle; // ? Entity_Tear::Update 006670f0: set to GetAngleDegrees of the offset from the orbit centre when the orbit starts, then advanced each update by _orbitRadius/(90 or 30)*180/pi * update-time delta (0x39c) and normalized; Init zeroes it - float _orbitRadius; // ? Entity_Tear::Update 006670f0: 0 means not yet orbiting; set to +-length(offset to centre) (sign from _tearIdx&1 or the side) when the orbit starts; FromAngle(_orbitAngle)*it gives the orbit position; Init zeroes it - float _tearRange; // Entity_Player::FireTear 00790af0 copies player _tearrange (+0x1480) to tear+0x820; Entity_Tear::Init 006660a0 sets 260.0; Update compares it to +0x3a4 - uint8_t _pad_0x824[0x24]; -}; -static_assert(offsetof(Entity_Tear, _damageEvents) == 0x8); -static_assert(offsetof(Entity_Tear, _pendingDamage) == 0x14); -static_assert(offsetof(Entity_Tear, _pendingDamageFlags) == 0x18); -static_assert(offsetof(Entity_Tear, _index) == 0x20); -static_assert(offsetof(Entity_Tear, _collisionIndex) == 0x24); -static_assert(offsetof(Entity_Tear, _type) == 0x28); -static_assert(offsetof(Entity_Tear, _variant) == 0x2c); -static_assert(offsetof(Entity_Tear, _subtype) == 0x30); -static_assert(offsetof(Entity_Tear, _spawnerType) == 0x34); -static_assert(offsetof(Entity_Tear, _spawnerVariant) == 0x38); -static_assert(offsetof(Entity_Tear, _sprite) == 0x48); -static_assert(offsetof(Entity_Tear, _spriteOffset) == 0xdc); -static_assert(offsetof(Entity_Tear, _spriteScale) == 0xe4); -static_assert(offsetof(Entity_Tear, _isFlipX) == 0x148); -static_assert(offsetof(Entity_Tear, _shadowSize) == 0x15c); -static_assert(offsetof(Entity_Tear, _shadowOffset) == 0x160); -static_assert(offsetof(Entity_Tear, _flags) == 0x168); -static_assert(offsetof(Entity_Tear, _valid) == 0x170); -static_assert(offsetof(Entity_Tear, _visible) == 0x171); -static_assert(offsetof(Entity_Tear, _exists) == 0x172); -static_assert(offsetof(Entity_Tear, _dead) == 0x173); -static_assert(offsetof(Entity_Tear, _isKillOnTouch) == 0x174); -static_assert(offsetof(Entity_Tear, _isInterpolating) == 0x175); -static_assert(offsetof(Entity_Tear, _isInitFlag176) == 0x176); -static_assert(offsetof(Entity_Tear, _removedByFactory) == 0x177); -static_assert(offsetof(Entity_Tear, _collisionPoints) == 0x178); -static_assert(offsetof(Entity_Tear, _entityGridCollisionClass) == 0x184); -static_assert(offsetof(Entity_Tear, _entityCollisionClass) == 0x188); -static_assert(offsetof(Entity_Tear, _collidesWithEntity) == 0x18c); -static_assert(offsetof(Entity_Tear, _collidesWithGrid) == 0x190); -static_assert(offsetof(Entity_Tear, _gridCollisionVelocity) == 0x194); -static_assert(offsetof(Entity_Tear, _gridCollisionNormal) == 0x19c); -static_assert(offsetof(Entity_Tear, _renderPosition) == 0x1a4); -static_assert(offsetof(Entity_Tear, _colorParams) == 0x1ac); -static_assert(offsetof(Entity_Tear, _color) == 0x1b8); -static_assert(offsetof(Entity_Tear, _splatColor) == 0x1e4); -static_assert(offsetof(Entity_Tear, _fireDamageCountdown) == 0x210); -static_assert(offsetof(Entity_Tear, _damageCountdown) == 0x214); -static_assert(offsetof(Entity_Tear, _freezeCountdown) == 0x218); -static_assert(offsetof(Entity_Tear, _poisonCountdown) == 0x21c); -static_assert(offsetof(Entity_Tear, _slowingCountdown) == 0x220); -static_assert(offsetof(Entity_Tear, _charmedCountdown) == 0x224); -static_assert(offsetof(Entity_Tear, _confusionCountdown) == 0x228); -static_assert(offsetof(Entity_Tear, _midasFreezeCountdown) == 0x22c); -static_assert(offsetof(Entity_Tear, _fearCountdown) == 0x230); -static_assert(offsetof(Entity_Tear, _burnCountdown) == 0x234); -static_assert(offsetof(Entity_Tear, _bossStatusEffectCooldown) == 0x238); -static_assert(offsetof(Entity_Tear, _shrinkCountdown) == 0x23c); -static_assert(offsetof(Entity_Tear, _charmSource) == 0x240); -static_assert(offsetof(Entity_Tear, _entityRef2) == 0x268); -static_assert(offsetof(Entity_Tear, _entityRef3) == 0x290); -static_assert(offsetof(Entity_Tear, _entityRef4) == 0x2b8); -static_assert(offsetof(Entity_Tear, _poisonDamageTimer) == 0x2e0); -static_assert(offsetof(Entity_Tear, _burnDamageTimer) == 0x2e4); -static_assert(offsetof(Entity_Tear, _bleedingCountdown) == 0x2e8); -static_assert(offsetof(Entity_Tear, _bleedDamageAccumulator) == 0x2ec); -static_assert(offsetof(Entity_Tear, _magnetizedCountdown) == 0x2f0); -static_assert(offsetof(Entity_Tear, _baitedCountdown) == 0x2f4); -static_assert(offsetof(Entity_Tear, _knockbackCountdown) == 0x2f8); -static_assert(offsetof(Entity_Tear, _weaknessCountdown) == 0x2fc); -static_assert(offsetof(Entity_Tear, _iceCountdown) == 0x300); -static_assert(offsetof(Entity_Tear, _brimstoneMarkCountdown) == 0x304); -static_assert(offsetof(Entity_Tear, _knockbackDirection) == 0x308); -static_assert(offsetof(Entity_Tear, _iceFrozenEffect) == 0x310); -static_assert(offsetof(Entity_Tear, _pausePosition) == 0x314); -static_assert(offsetof(Entity_Tear, _pauseTimer) == 0x31c); -static_assert(offsetof(Entity_Tear, _poisonTickDamage) == 0x320); -static_assert(offsetof(Entity_Tear, _burnTickDamage) == 0x324); -static_assert(offsetof(Entity_Tear, _spawnFrame) == 0x328); -static_assert(offsetof(Entity_Tear, _spawnGridIndex) == 0x32c); -static_assert(offsetof(Entity_Tear, _config) == 0x330); -static_assert(offsetof(Entity_Tear, _targetPosition) == 0x334); -static_assert(offsetof(Entity_Tear, _pos) == 0x33c); -static_assert(offsetof(Entity_Tear, _preInterpolatePos) == 0x344); -static_assert(offsetof(Entity_Tear, _posOffset) == 0x34c); -static_assert(offsetof(Entity_Tear, _renderZOffset) == 0x354); -static_assert(offsetof(Entity_Tear, _renderDepthOffset) == 0x358); -static_assert(offsetof(Entity_Tear, _sortingLayer) == 0x35c); -static_assert(offsetof(Entity_Tear, _velocity) == 0x360); -static_assert(offsetof(Entity_Tear, _baseFriction) == 0x368); -static_assert(offsetof(Entity_Tear, _friction) == 0x36c); -static_assert(offsetof(Entity_Tear, _size) == 0x370); -static_assert(offsetof(Entity_Tear, _sizeMulti) == 0x374); -static_assert(offsetof(Entity_Tear, _mass) == 0x37c); -static_assert(offsetof(Entity_Tear, _health) == 0x380); -static_assert(offsetof(Entity_Tear, _maxHitPoints) == 0x384); -static_assert(offsetof(Entity_Tear, _collisionDamage) == 0x388); -static_assert(offsetof(Entity_Tear, _prevPosition) == 0x38c); -static_assert(offsetof(Entity_Tear, _prevVelocity) == 0x394); -static_assert(offsetof(Entity_Tear, _speedMultiplier) == 0x39c); -static_assert(offsetof(Entity_Tear, _prevUpdateTime) == 0x3a0); -static_assert(offsetof(Entity_Tear, _updateTime) == 0x3a4); -static_assert(offsetof(Entity_Tear, _slowingAmount) == 0x3ac); -static_assert(offsetof(Entity_Tear, _isInvicible) == 0x3b0); -static_assert(offsetof(Entity_Tear, _shrinkStatus1) == 0x3b4); -static_assert(offsetof(Entity_Tear, _shrinkStatus2) == 0x3b8); -static_assert(offsetof(Entity_Tear, _parent) == 0x3bc); -static_assert(offsetof(Entity_Tear, _child) == 0x3c0); -static_assert(offsetof(Entity_Tear, _target) == 0x3c4); -static_assert(offsetof(Entity_Tear, _spawnerEntity) == 0x3c8); -static_assert(offsetof(Entity_Tear, _entityPtrReferrers) == 0x3cc); -static_assert(offsetof(Entity_Tear, _minecart) == 0x3d4); -static_assert(offsetof(Entity_Tear, _hitEffect) == 0x3d8); -static_assert(offsetof(Entity_Tear, _dropRNG) == 0x3dc); -static_assert(offsetof(Entity_Tear, _initSeed) == 0x3ec); -static_assert(offsetof(Entity_Tear, _holdCountdown) == 0x3f0); -static_assert(offsetof(Entity_Tear, _holdPosition) == 0x3f4); -static_assert(offsetof(Entity_Tear, _pitfallState) == 0x3fc); -static_assert(offsetof(Entity_Tear, _pitfallTimer) == 0x400); -static_assert(offsetof(Entity_Tear, _scoreMultiplier) == 0x404); -static_assert(offsetof(Entity_Tear, _luaBridgeRef) == 0x408); -static_assert(offsetof(Entity_Tear, _height) == 0x410); -static_assert(offsetof(Entity_Tear, _fallingSpeed) == 0x414); -static_assert(offsetof(Entity_Tear, _fallingAccel) == 0x418); -static_assert(offsetof(Entity_Tear, _homingFriction) == 0x41c); -static_assert(offsetof(Entity_Tear, _fScale) == 0x420); -static_assert(offsetof(Entity_Tear, _baseScale) == 0x424); -static_assert(offsetof(Entity_Tear, _tearFlags) == 0x428); -static_assert(offsetof(Entity_Tear, _waitFrames) == 0x438); -static_assert(offsetof(Entity_Tear, _continueVelocity) == 0x43c); -static_assert(offsetof(Entity_Tear, _hitList) == 0x444); -static_assert(offsetof(Entity_Tear, _tearIdx) == 0x450); -static_assert(offsetof(Entity_Tear, _baseDamage) == 0x454); -static_assert(offsetof(Entity_Tear, _rotation) == 0x458); -static_assert(offsetof(Entity_Tear, _scaleAnimNum) == 0x45c); -static_assert(offsetof(Entity_Tear, _knockbackMultiplier) == 0x460); -static_assert(offsetof(Entity_Tear, _deadEyeIntensity) == 0x464); -static_assert(offsetof(Entity_Tear, _multidimensionalTouched) == 0x468); -static_assert(offsetof(Entity_Tear, _prismTouched) == 0x469); -static_assert(offsetof(Entity_Tear, _isFireSoundPending) == 0x46a); -static_assert(offsetof(Entity_Tear, _popBounceCount) == 0x46c); -static_assert(offsetof(Entity_Tear, _hitCount) == 0x470); -static_assert(offsetof(Entity_Tear, _deathFlags) == 0x474); -static_assert(offsetof(Entity_Tear, _stickTarget) == 0x478); -static_assert(offsetof(Entity_Tear, _stickDiff) == 0x47c); -static_assert(offsetof(Entity_Tear, _stickTimer) == 0x484); -static_assert(offsetof(Entity_Tear, _techZeroLaser) == 0x488); -static_assert(offsetof(Entity_Tear, _techZeroTarget) == 0x48c); -static_assert(offsetof(Entity_Tear, _laserShotLaser) == 0x490); -static_assert(offsetof(Entity_Tear, _linkPrev) == 0x494); -static_assert(offsetof(Entity_Tear, _linkNext) == 0x498); -static_assert(offsetof(Entity_Tear, _attachedEffect) == 0x49c); -static_assert(offsetof(Entity_Tear, _tearHaloANM2) == 0x4ac); -static_assert(offsetof(Entity_Tear, _tearEffectANM2) == 0x5c0); -static_assert(offsetof(Entity_Tear, _deadEyeANM2) == 0x6d4); -static_assert(offsetof(Entity_Tear, _canTriggerStreakEnd) == 0x7e8); -static_assert(offsetof(Entity_Tear, _isHovering) == 0x7e9); -static_assert(offsetof(Entity_Tear, _isFireSoundMuted) == 0x7ea); -static_assert(offsetof(Entity_Tear, _posDisplacement) == 0x7ec); -static_assert(offsetof(Entity_Tear, _parentOffset) == 0x7f4); -static_assert(offsetof(Entity_Tear, _holdTimer) == 0x7fc); -static_assert(offsetof(Entity_Tear, _holdOffset) == 0x800); -static_assert(offsetof(Entity_Tear, _holdVelocity) == 0x808); -static_assert(offsetof(Entity_Tear, _orbitVelocity) == 0x810); -static_assert(offsetof(Entity_Tear, _orbitAngle) == 0x818); -static_assert(offsetof(Entity_Tear, _orbitRadius) == 0x81c); -static_assert(offsetof(Entity_Tear, _tearRange) == 0x820); -static_assert(sizeof(Entity_Tear) == 0x848); - -struct Font { - bool _isLoaded; // Font::Load 00a1a730 sets *this=1 on success; Font::Unload 00a1ad90 and ctor 00a1a640 clear it - uint8_t _pad_0x1[0x3]; - int16_t _fontSize; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint8_t _infoBitField; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint8_t _charSet; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint16_t _stretchH; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint8_t _aa; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint8_t _paddingUp; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint8_t _paddingRight; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint8_t _paddingDown; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint8_t _paddingLeft; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint8_t _spacingHoriz; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint8_t _spacingVert; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint8_t _outline; // Font::Load 00a1a730 reads BMFont v3 block 1 (info, 0x10 bytes) straight into +0x4; BMFont info layout puts this field here - uint8_t _pad_0x12[0x2]; - uint16_t _lineHeight; // Font::GetLineHeight 00a1aea0 returns u16 +0x14; Font::Load 00a1a730 block 2 read into +0x14 - uint16_t _base; // Font::GetBaselineHeight 00a1aeb0 returns u16 +0x16; Font::Load block 2 - uint16_t _scaleW; // Font::Load 00a1a730 reads BMFont v3 block 2 (common, 0x10 bytes) straight into +0x14; BMFont common layout puts this field here - uint16_t _scaleH; // Font::Load 00a1a730 reads BMFont v3 block 2 (common, 0x10 bytes) straight into +0x14; BMFont common layout puts this field here - uint16_t _pages; // Font::Load 00a1a730 block 2 into +0x14; then uses u16 +0x1c as page count (copied to +0x38, sizes page texture array) - uint8_t _commonBitField; // Font::Load 00a1a730 reads BMFont v3 block 2 (common, 0x10 bytes) straight into +0x14; BMFont common layout puts this field here - uint8_t _alphaChannel; // Font::Load 00a1a730 reads BMFont v3 block 2 (common, 0x10 bytes) straight into +0x14; BMFont common layout puts this field here - uint8_t _redChannel; // Font::Load 00a1a730 reads BMFont v3 block 2 (common, 0x10 bytes) straight into +0x14; BMFont common layout puts this field here - uint8_t _greenChannel; // Font::Load 00a1a730 reads BMFont v3 block 2 (common, 0x10 bytes) straight into +0x14; BMFont common layout puts this field here - uint8_t _blueChannel; // Font::Load 00a1a730 reads BMFont v3 block 2 (common, 0x10 bytes) straight into +0x14; BMFont common layout puts this field here - uint8_t _pad_0x23[0x1]; - uint32_t _numChars; // Font::Load 00a1a730 block 4: +0x24 = blockSize / 0x14; Unload/ctor zero - uint32_t _chars; // FontCharBlock* // Font::Load 00a1a730 allocates and reads +0x24 records of 0x14 into +0x28; Unload 00a1ad90 frees it - uint8_t _kerningPairs[0xc]; // vector_KerningPair; Font::Load 00a1a730 block 5: std::vector begin/end/cap at +0x2c/+0x30/+0x34, 0x10-byte pairs (reads 4,4,2 per pair); only 0xc bytes, not 0x14 as REPENTOGON spacing implies - uint32_t _numPages; // not in REPENTOGON: Font::Load 00a1a730 sets +0x38 = pages(+0x1c) and loops page textures to it; Unload zeroes - uint32_t _pageTextures; // TexturePtr* // not in REPENTOGON: Font::Load 00a1a730 new[] of +0x38 8-byte texture ptrs; Unload 00a1ad90 eh-vector-dtor(8, 0040c440) + delete - uint8_t _charsBlock[0x8]; // std_map_CharBlocks; ctor 00a1a640 allocates map head at +0x40 (size +0x44); Font::SetMissingCharacter 00a1b3b0 _Find_lower_bound in it; Unload erases tree - int _missingCharacter; // Font::SetMissingCharacter 00a1b3b0 writes map value or -1; ctor 00a1a640 = -1 -}; -static_assert(offsetof(Font, _isLoaded) == 0x0); -static_assert(offsetof(Font, _fontSize) == 0x4); -static_assert(offsetof(Font, _infoBitField) == 0x6); -static_assert(offsetof(Font, _charSet) == 0x7); -static_assert(offsetof(Font, _stretchH) == 0x8); -static_assert(offsetof(Font, _aa) == 0xa); -static_assert(offsetof(Font, _paddingUp) == 0xb); -static_assert(offsetof(Font, _paddingRight) == 0xc); -static_assert(offsetof(Font, _paddingDown) == 0xd); -static_assert(offsetof(Font, _paddingLeft) == 0xe); -static_assert(offsetof(Font, _spacingHoriz) == 0xf); -static_assert(offsetof(Font, _spacingVert) == 0x10); -static_assert(offsetof(Font, _outline) == 0x11); -static_assert(offsetof(Font, _lineHeight) == 0x14); -static_assert(offsetof(Font, _base) == 0x16); -static_assert(offsetof(Font, _scaleW) == 0x18); -static_assert(offsetof(Font, _scaleH) == 0x1a); -static_assert(offsetof(Font, _pages) == 0x1c); -static_assert(offsetof(Font, _commonBitField) == 0x1e); -static_assert(offsetof(Font, _alphaChannel) == 0x1f); -static_assert(offsetof(Font, _redChannel) == 0x20); -static_assert(offsetof(Font, _greenChannel) == 0x21); -static_assert(offsetof(Font, _blueChannel) == 0x22); -static_assert(offsetof(Font, _numChars) == 0x24); -static_assert(offsetof(Font, _chars) == 0x28); -static_assert(offsetof(Font, _kerningPairs) == 0x2c); -static_assert(offsetof(Font, _numPages) == 0x38); -static_assert(offsetof(Font, _pageTextures) == 0x3c); -static_assert(offsetof(Font, _charsBlock) == 0x40); -static_assert(offsetof(Font, _missingCharacter) == 0x48); - -struct ItemPool_Item { - float _totalWeight; // ItemPool::load_pools 00735a30 adds each item's weight to pool+0; ItemPool::GetCollectible 00733610 RNG::RandomFloat * pool._totalWeight; ctor 00732c20 = 0 - uint8_t _poolList[0xc]; // std_vector_PoolItem; ItemPool_Item ctor 00732c20 zeroes +4/+8/+0xc; ItemPool::load_pools 00735a30 emplaces 0x18-byte items at pool+8 (end) / +0xc (cap); shuffle_pools 00735910 and StoreGameState 007367d0 walk pool+4..+8 stride 0x18 - RNG _rng1; // ItemPool_Item ctor 00732c20 sets +0x10 = 0xaa17414f and the shift triple at +0x14..+0x1c (RNG layout) - RNG _rng2; // ItemPool_Item ctor 00732c20 sets +0x20 = 0xaa17414f and the shift triple at +0x24..+0x2c - uint32_t _bibleUpgrade; // ItemPool_Item ctor 00732c20 zeroes +0x30; ItemPool::StoreGameState 007367d0 copies pool+0x30 to GameStateItemPool._bibleUpgrades[i]; ItemPool::AddBibleUpgrade 00736fd0 adds to ItemPool+0x34+i*0x34; stride 0x34 (GetPool 00732c70) -}; -static_assert(offsetof(ItemPool_Item, _totalWeight) == 0x0); -static_assert(offsetof(ItemPool_Item, _poolList) == 0x4); -static_assert(offsetof(ItemPool_Item, _rng1) == 0x10); -static_assert(offsetof(ItemPool_Item, _rng2) == 0x20); -static_assert(offsetof(ItemPool_Item, _bibleUpgrade) == 0x30); - -struct ItemPool { - uint32_t _seed; // 00734f30 ItemPool::Init stores the seed param at *this (and at 0x654); 007367d0 StoreGameState copies *this to GameStateItemPool._seed - ItemPool_Item _pools[31]; // 00732c70 GetPool returns this+4+type*0x34; ctor 006f1020 eh-vector-ctor(_itemPool+4, 0x34, 0x1f); 00736fd0 AddBibleUpgrade adds to +0x34+i*0x34 (pool._bibleUpgrade); 00732e90 GetItemPoolsForCollectible walks pool vectors at +0x8/+0xc stride 0x34 - int _lastPool; - RNG _itemPoolRNG; // 00734f30 ItemPool::Init stores seed param at this+0x654 and steps it; 00735910 shuffle_pools MTRNG::Init(this+0x654 seed); 007367d0 StoreGameState saves it - RNG _trinketPoolRNG; // 00734f30 Init seeds it with the stepped item-pool seed, shifts 1/5/0x13 at 0x668..0x670; 00733ca0 GetTrinket copies/steps it (FUN_008658c0(.., this+0x664)); 007367d0 StoreGameState writes it to _trinketPoolRNGseed - float _unkFloat674; // ? 00734f30 Init = 1.0f; 007367d0 StoreGameState saves it to GameStateItemPool+0x200; StatHUD::update_player 0084cc40 shows Game+0x1adb4 (=ItemPool+0x674) *100 as stat slot 8 (after devil/angel), a slot StatHUD::Render 0084c2c0 skips - float _unkFloat678; // ? 00734f30 Init = 1.0f; 007367d0 StoreGameState saves it to GameStateItemPool+0x204 (GameState::Clear 009c79a0 also sets both to 1.0f); no other reader found - uint8_t _removedCollectibles[0x10]; // vector_bool; 00733ff0 Lua RemoveCollectible: bit test/set in *(this+0x67c), bound *(this+0x688) (vector size); 007340b0 ResetCollectible clears bit - uint8_t _roomBlacklistedCollectibles[0x10]; // vector_bool; 005b14b0 Lua AddRoomBlacklist sets bit in *(this+0x68c); 00736f90 ResetRoomBlacklist clears bits up to size *(this+0x698) - uint8_t _pad_0x69c[0xf8]; - uint8_t _trinketPoolItems[0xc]; // vector_TrinketPoolItem; 00734130 Lua RemoveTrinket / 00736a90 ResetTrinkets walk *(this+0x794)..*(this+0x798) stride 8 (id,+4 available,+5 unlocked) - int _numAvailableTrinkets; // 00734130 RemoveTrinket decrements this+0x7a0; 00736a90 ResetTrinkets recounts it, warns "trinket pool is empty" when 0 -}; -static_assert(offsetof(ItemPool, _seed) == 0x0); -static_assert(offsetof(ItemPool, _pools) == 0x4); -static_assert(offsetof(ItemPool, _lastPool) == 0x650); -static_assert(offsetof(ItemPool, _itemPoolRNG) == 0x654); -static_assert(offsetof(ItemPool, _trinketPoolRNG) == 0x664); -static_assert(offsetof(ItemPool, _unkFloat674) == 0x674); -static_assert(offsetof(ItemPool, _unkFloat678) == 0x678); -static_assert(offsetof(ItemPool, _removedCollectibles) == 0x67c); -static_assert(offsetof(ItemPool, _roomBlacklistedCollectibles) == 0x68c); -static_assert(offsetof(ItemPool, _trinketPoolItems) == 0x794); -static_assert(offsetof(ItemPool, _numAvailableTrinkets) == 0x7a0); - -struct PlayerManager { - uint8_t _playerList[0xc]; // vector_EntityPlayerPtr; 009b92c0 PlayerManager::GetPlayer indexes *this..this[1] (>>2), logs "There are no players"; IsCoopPlay/GetRandomPlayer iterate it - CoopJoinSlot _coopSlots[4]; // 4 records of 0x14 at +0xc/+0x20/+0x34/+0x48: PlayerManager::handle_coop_join 009bac40 checks each slot's controller/state and fills playerType/1/1.0/locked; GetPlayerSlotFromController 009baaa0 scans this+0xc for a controller; RemoveCoPlayer 009ba000 resets them (-1,0,-1,0) - uint8_t _pad_0x5c[0x14]; - uint8_t _coopPlayerTypes[0xc]; // std_vector_int; handle_coop_join 009bac40 picks a random element 1..n-1 of begin/end +0x70/+0x74 for a random (-1) co-op character; HUD::Render 009a3eb0 (Game+0x1bb18) draws the join carousel from it - uint8_t _pad_0x7c[0x3c]; - RNG _rng; // 006f1020 Game::constructor (PM at Game+0x1baa8): RNG default init (seed 0xaa17414f, shifts 5,9,7) at PM+0xb8, esauJr[4] zeroed at PM+0x80 as in REPENTOGON; 006f9000 Game::store_game_state saves its seed (Game+0x1bb60) - uint32_t _stageTransitionPlayer; // Entity_Player* // Game::StartStageTransition tail (006fdf4d, after the noreturn log call) stores the player argument at Game+0x1bb70; StageTransition::Update 0092f1c0 plays AnimateCollectible(0x7f,"Pickup","PlayerPickupSparkle") for this player and PlayExtraAnimation for the others; Entity_Player dtor 00754ed0 nulls it if it is this; ctor zeroes - uint32_t _roomTransitionPlayer; // Entity_Player* // RoomTransition start 0082ee40 (at 0082efcb) stores StartRoomTransition's player argument at Game+0x1bb74; RoomTransition::ChangeRoom 00830950 uses it (fallback GetPlayer(0)) and teleports it for type 0x11, StartBossIntro reads it, FUN_00707ad0 passes it back to StartRoomTransition; Entity_Player dtor 00754ed0 nulls it - uint8_t _extraPlayers[0xc]; // std_vector_EntityPlayerPtr; ? begin/end Game+0x1bb78/0x1bb7c (ctor zeroes 0x1bb78..0x1bb80): EntityList::Update 004186c0 runs Update (vtable +0xc) on each element after the main player list with flag 0x4000 like players; elements have Entity_Player _controllerIndex (+0x1618) and Entity_NPC::TransferControl 006d88b0 / NpcAI::ENTITY_HEART retarget their _target (+0x3c4) when the NPC they control changes; ~PlayerManager 009b8ea0 deletes every element (owned) -}; -static_assert(offsetof(PlayerManager, _playerList) == 0x0); -static_assert(offsetof(PlayerManager, _coopSlots) == 0xc); -static_assert(offsetof(PlayerManager, _coopPlayerTypes) == 0x70); -static_assert(offsetof(PlayerManager, _rng) == 0xb8); -static_assert(offsetof(PlayerManager, _stageTransitionPlayer) == 0xc8); -static_assert(offsetof(PlayerManager, _roomTransitionPlayer) == 0xcc); -static_assert(offsetof(PlayerManager, _extraPlayers) == 0xd0); - -struct ItemOverlay { - int _state; // ItemOverlay::Update 009aca90: 1 counts _delay down, 0 idle, 2 active until the anim ends (REPENTOGON INACTIVE/WAITING/ACTIVE) - int _overlayID; // ItemOverlay::Show 009ad210 stores eOverlayID (<= 0x2f) here; Update 009aca90 tests == 0x2c - ANM2 _sprite; // ItemOverlay::Show 009ad210 ANM2::Reset/Load/ReplaceSpritesheet/LoadGraphics(this+8) from the per-overlay table (0x58 records from +0x11c); Update 009aca90 updates/reads its anim state (+0x38/+0x3c) - uint8_t _pad_0x11c[0x1080]; - int _delay; // ItemOverlay::Show 009ad210 stores delay; Update 009aca90 decrements it in state 1 and starts the overlay when < 1 - uint8_t _player[0x4]; // EntityPtr; ItemOverlay::Show 009ad210 assigns player with the EntityPtr multiset erase/insert; Update 009aca90 sets player+0x171 and Render 009acfe0 skips without it - ANM2 _megaMushPlayerSprite; // Game ctor ANM2::constructor at Game+0x1d1d8 (= _itemOverlay+0x11a4); ~ItemOverlay 009abd80 resets ANM2 at +0x11a4; Entity_Player::trigger_collectible_effect_removed 00793970 for Mega Mush (0x271) copies the player sprite into it, zeroes its layer offsets and plays "TransformBack"; ItemOverlay::Render draws it -}; -static_assert(offsetof(ItemOverlay, _state) == 0x0); -static_assert(offsetof(ItemOverlay, _overlayID) == 0x4); -static_assert(offsetof(ItemOverlay, _sprite) == 0x8); -static_assert(offsetof(ItemOverlay, _delay) == 0x119c); -static_assert(offsetof(ItemOverlay, _player) == 0x11a0); -static_assert(offsetof(ItemOverlay, _megaMushPlayerSprite) == 0x11a4); - -struct HUD { - uint8_t _playerHUD[14048]; // PlayerHUD[8], stride 0x6dc; ctor 006f2060 eh_vector_constructor(this, 0x6dc, 8, PlayerHUD ctor 006efc70); InvalidateCraftingItem 009a2c70 walks the 8 entries (stride 0x6dc, owner player at +0) - Font _font; // HUD::LoadGraphics 009a1a30 Font::Load(font/MPlus_12b.fnt) into +0x36e0 (ctor 006f2060 Font ctor after the PlayerHUD array) - Font _fontKR; // HUD::LoadGraphics 009a1a30 Font::Load(font/KR_Font14.fnt) into +0x372c - ANM2 _chargeBarSprite; // HUD::LoadGraphics 009a1a30 loads gfx/ui/ui_chargebar.anm2; ctor 006f2060 (PlayerHUD 0x6dc x8 + 2 Font = 0x20 below REPENTOGON) - ANM2 _chargeBarSmallSprite; // not in REPENTOGON (unnamed gap): HUD::LoadGraphics 009a1a30 loads gfx/ui/ui_chargebar_small.anm2 - ANM2 _heartsSprite; // HUD::LoadGraphics 009a1a30 loads gfx/ui/ui_hearts.anm2 - ANM2 _pickupHUDSprite; // HUD::LoadGraphics 009a1a30 loads gfx/ui/hudpickups.anm2 - ANM2 _cardsPillsSprite; // HUD::LoadGraphics 009a1a30 loads gfx/ui/ui_cardspills.anm2 - uint8_t _messageMain[0x1f4]; // HUD_Message; ctor 006f2060 HUD_Message ctor 008405b0 right after cardsPills; FUN_009a27d0 resets its streak ANM2 (+0x20=0x3cfc) and _showing (+8=0x3ce4) - uint8_t _messageStack[0xbb8]; // HUD_Message; ctor 006f2060 eh-vector-ctor(0x3ed0, 500, 6, 008405b0); HUD::Update 009a2990 ticks 6 - uint8_t _messagePlayerHUD[0x7d0]; // HUD_Message; ctor 006f2060 eh-vector-ctor(0x4a88, 500, 4, 008405b0); HUD::Update 009a2990 ticks 4 - ANM2 _fortuneSprite; // HUD::LoadGraphics 009a1a30 loads gfx/ui/ui_FortunePaper.anm2; HUD::Update 009a2990 SlideIn/SlideOut events - uint8_t _pad_0x536c[0x8]; - ANM2 _statsSprite; // HUD::LoadGraphics 009a1a30 loads gfx/ui/hudstats.anm2 - uint8_t _pad_0x5488[0x8]; - float _bossHPBarFill; // boss bar render FUN_009a7c90: if (0 <= +0x5490) width = +0x5490 * 110.0; HUD reset FUN_009a19a0 = -1.0f - int _bossHPBarDamageFlash; // EntityList::Update 004186c0 sets Game+0x22e98 (HUD +0x5494) = 8 when the boss bar fill drops; HUD::Update 009a2990 decrements while >=0; boss bar render 009a7c90 blinks white/red on odd frames; reset 009a19a0 = -1 - int _bossHPBarHealFlash; // EntityList::Update 004186c0 sets Game+0x22e9c (HUD +0x5498) = 8 when the boss bar fill rises (and clears the damage flash); HUD::Update 009a2990 decrements while >=0; boss bar render 009a7c90 tints on odd frames; reset 009a19a0 = -1 - uint8_t _pad_0x549c[0x30]; - bool _isVisible; - bool _isGraphicsLoaded; // not in REPENTOGON: HUD::LoadGraphics 009a1a30 sets 1 at end and loads fonts only if 0; FUN_009a1970 clears it before reloading - uint8_t _pad_0x54ce[0x2]; - int _hudRefreshType; // FUN_009a6110(type) (HUD refresh request, called by PlayerHUD::Update 00842230 with 1) sets +0x54d0=type, +0x54d8=2; HUD::Update 009a2990 zeroes it when countdown ends - bool _isRefreshTick; // ? HUD::Update 009a2990: when set, decrements _hudRefreshCountdown, clears it, zeroes _hudRefreshType at <1; reset 009a19a0 clears it (no writer of 1 found in the dump) - uint8_t _pad_0x54d5[0x3]; - int _hudRefreshCountdown; // HUD::Update 009a2990 decrements it, zeroes +0x54d0 at <1; FUN_009a6110 sets 2 - ANM2 _coopMenuSprite; // HUD::LoadGraphics 009a1a30 loads gfx/ui/coop menu.anm2 (shift -0x18 from here) - ANM2 _inventorySprite; // HUD::LoadGraphics 009a1a30 loads gfx/ui/ui_inventory.anm2 - ANM2 _craftingTableSprite; // HUD::LoadGraphics 009a1a30 loads gfx/ui/ui_crafting.anm2 - ANM2 _poopSpellsSprite; // HUD::LoadGraphics 009a1a30 loads gfx/ui/ui_poops.anm2 - uint8_t _pad_0x592c[0x78]; - uint8_t _statHUD[0x2b0]; // StatHUD; HUD::Render 009a3eb0: LEA ECX,[EDI+0x59a4] then CALL StatHUD::Render 0084c2c0 (009a568c); its first member ANM2 loads gfx/ui/hudstats2.anm2 (LoadGraphics) - uint8_t _historyHUD[0x4]; // HistoryHUD; HUD::Render 009a3eb0: LEA ECX,[EDI+0x5c54] then CALL 0083ac20 (item-history render); ctor 006f2060 eh-vector-ctor(0x5c54, 0x14, 2) -}; -static_assert(offsetof(HUD, _playerHUD) == 0x0); -static_assert(offsetof(HUD, _font) == 0x36e0); -static_assert(offsetof(HUD, _fontKR) == 0x372c); -static_assert(offsetof(HUD, _chargeBarSprite) == 0x3778); -static_assert(offsetof(HUD, _chargeBarSmallSprite) == 0x388c); -static_assert(offsetof(HUD, _heartsSprite) == 0x39a0); -static_assert(offsetof(HUD, _pickupHUDSprite) == 0x3ab4); -static_assert(offsetof(HUD, _cardsPillsSprite) == 0x3bc8); -static_assert(offsetof(HUD, _messageMain) == 0x3cdc); -static_assert(offsetof(HUD, _messageStack) == 0x3ed0); -static_assert(offsetof(HUD, _messagePlayerHUD) == 0x4a88); -static_assert(offsetof(HUD, _fortuneSprite) == 0x5258); -static_assert(offsetof(HUD, _statsSprite) == 0x5374); -static_assert(offsetof(HUD, _bossHPBarFill) == 0x5490); -static_assert(offsetof(HUD, _bossHPBarDamageFlash) == 0x5494); -static_assert(offsetof(HUD, _bossHPBarHealFlash) == 0x5498); -static_assert(offsetof(HUD, _isVisible) == 0x54cc); -static_assert(offsetof(HUD, _isGraphicsLoaded) == 0x54cd); -static_assert(offsetof(HUD, _hudRefreshType) == 0x54d0); -static_assert(offsetof(HUD, _isRefreshTick) == 0x54d4); -static_assert(offsetof(HUD, _hudRefreshCountdown) == 0x54d8); -static_assert(offsetof(HUD, _coopMenuSprite) == 0x54dc); -static_assert(offsetof(HUD, _inventorySprite) == 0x55f0); -static_assert(offsetof(HUD, _craftingTableSprite) == 0x5704); -static_assert(offsetof(HUD, _poopSpellsSprite) == 0x5818); -static_assert(offsetof(HUD, _statHUD) == 0x59a4); -static_assert(offsetof(HUD, _historyHUD) == 0x5c54); - -struct RoomConfig { - uint8_t _pad_0x0[0x1c54]; - uint8_t _curses[0xc]; // std_vector_RoomConfig_Curse; inline RoomConfig ctor in Game::constructor (esi=Game+0x18910) zeroes esi+0x1c54/0x1c58/0x1c5c; Isaac::GetCurseIdByName 0086f9f0, Level::GetCurseName 00746260 and Level::AddCurse 0074a2d0 walk begin/end Game+0x1a564/0x1a568 in 0x1c-byte entries -}; -static_assert(offsetof(RoomConfig, _curses) == 0x1c54); - -struct GameOver { - uint8_t _pad_0x0[0x11c]; - bool _isStopSoundsPending; // DeathScreen::Show 009997c0 (ECX=Game+0x1d520, from Game::End) sets +0x11c = 1; Game::Update 006fadc0 while _gameOver != 0 calls SFXManager::StopLoopingSounds once when set and clears it; LoadConfigXmls / ReloadStagesXmlOnLuaReset clear it - uint8_t _pad_0x11d[0x3]; -}; -static_assert(offsetof(GameOver, _isStopSoundsPending) == 0x11c); - -struct Leaderboard { - uint8_t _pad_0x0[0x4]; - int _state; // Leaderboard::constructor 00856f70 zeroes this+4; Leaderboard::Update 00857450 advances it 1 -> 2 ("Loading") -> 3 ("DisplayRankStart"); Game::Update 006fadc0 runs Leaderboard::Update and returns while Game+0x1d654 != 0; Game::IsPaused, update_ingame_input, FUN_008d1f20 treat != 0 as a leaderboard on screen; Game::Exit zeroes it -}; -static_assert(offsetof(Leaderboard, _state) == 0x4); - -struct GenericPrompt { - ANM2 _sprite; // GenericPrompt::Show 008380f0 ANM2::SetAnimation(this,"Appear") and AnimationState::Rewind(this+0x30); GenericPrompt::Update 00837ab0 updates the anim state while byte +0x109 (ANM2 _loaded) is set and reads its animData +0x34 - uint8_t _pad_0x114[0x1c]; - bool _isOnlineVote; // GenericPrompt::handle_input sends the choice through online_vote_send when byte this+0x130 is set; Game::Update 006fadc0 returns after GenericPrompt::Update and Game::Render 006fbc10 draws the completion widget vote counter ("%d/%d") while Game+0x268a8 is set; Menu_Options::Update / ctor clear it - uint8_t _pad_0x131[0x3]; -}; -static_assert(offsetof(GenericPrompt, _sprite) == 0x0); -static_assert(offsetof(GenericPrompt, _isOnlineVote) == 0x130); - -struct PauseScreen { - int _state; // PauseScreen::Show 009b7680 sets *this=1; PauseScreen::Update 009b5d20 sets 4 after GenericPrompt::Show of the quit-daily prompt and back to 1 (then Game::End) when the prompt is answered - int _menuType; // ? ctor 009b5320 sets 0, Show 009b7680 sets 1; Update 009b5d20 picks the ANM2 at +0x140 (minisprite) when ==1 else +0x2c (mainsprite) for every selection test - uint8_t _pad_0x8[0x474]; - GenericPrompt _genericPrompt; // PauseScreen::Update 009b5d20 GenericPrompt::Show(this+0x47c,0) for "#QUIT_DAILY_RUN_*" and GenericPrompt::Update(this+0x47c,1); Render 009b7190 GenericPrompt::Render(this+0x47c); right after REPENTOGON's last ANM2 (0x368+0x114) - uint8_t _pad_0x5b0[0x9fc]; - int _playerIdx; // PauseScreen::Show 009b7680 sets this+0xfac (Game+0x24a20) to 0, or online to the index of the local player in _playerList (-1 if absent); FUN_009b5800 / Menu_Options::Update 009b23a0 / ~10 pause-menu item renderers (008d5f70, 008d7cb0) call Game::GetPlayer(g_game, it) to show/control that player -}; -static_assert(offsetof(PauseScreen, _state) == 0x0); -static_assert(offsetof(PauseScreen, _menuType) == 0x4); -static_assert(offsetof(PauseScreen, _genericPrompt) == 0x47c); -static_assert(offsetof(PauseScreen, _playerIdx) == 0xfac); - -struct Minimap { - int _state; // Minimap update 0098dba0 (named Game::update_map_input, this=Minimap) sets +0 to 0/1/2 by map-button hold; Minimap::Init 0098d560 zeroes - bool _unkBool; // Minimap update 0098dba0 toggles byte +4 with state (set 1 with state 2, 0 with state 0); Init 0098d560 zeroes - uint8_t _pad_0x5[0x3]; - uint32_t _holdTime; // Minimap update 0098dba0: ++ while ACTION_MAP held, ==10 triggers, <9 checks, reset 0; Init zeroes - float _unkFloat; // Minimap::Init 0098d560 = 1.0f; Minimap::Render 0098e4d0 uses (w - w * +0xc) * 0.5 (display scale) - uint8_t _pad_0x10[0x8]; - uint8_t _config[0x2c0]; // MinimapConfig; Minimap::Init 0098d560 loads gfx/ui/minimap1.anm2 at +0x18 and minimap2.anm2 at +0x178 (stride 0x160), writes config ptr/sizes per element - ANM2 _itemIconsSprite; // Minimap::Init 0098d560 loads gfx/ui/mapitemicons.anm2 at +0x2d8 - ANM2 _hudPickupSprite; // Minimap::Init 0098d560 loads gfx/ui/hudpickups.anm2 at +0x3ec - ANM2 _iconsSprite; // Minimap::Init 0098d560 loads gfx/ui/minimap_icons.anm2 at +0x500 - uint8_t _pad_0x614[0x8]; - int _shakeDuration; // Minimap update 0098dba0: if (+0x61c > 0) decrement and scale shake by it/10; Init zeroes - Vector _shakeOffset; // Minimap update 0098dba0 writes +0x620/+0x624 from shake; Render 0098e4d0 adds them to the draw position; Init = Vector::Zero -}; -static_assert(offsetof(Minimap, _state) == 0x0); -static_assert(offsetof(Minimap, _unkBool) == 0x4); -static_assert(offsetof(Minimap, _holdTime) == 0x8); -static_assert(offsetof(Minimap, _unkFloat) == 0xc); -static_assert(offsetof(Minimap, _config) == 0x18); -static_assert(offsetof(Minimap, _itemIconsSprite) == 0x2d8); -static_assert(offsetof(Minimap, _hudPickupSprite) == 0x3ec); -static_assert(offsetof(Minimap, _iconsSprite) == 0x500); -static_assert(offsetof(Minimap, _shakeDuration) == 0x61c); -static_assert(offsetof(Minimap, _shakeOffset) == 0x620); - -struct GameState { - uint8_t _pad_0x0[0x1fdec]; - bool _isSaveAvailable; // FUN_00959fa0 (load save slot) sets byte Manager+0x20d90 (=_gamestate+0x1fdec) to 1 when GameState read 009cc1a0 succeeds, else GameState::Delete; Menu_Game::Update 00981140 / PreRenderContinueImg 00982100 enable the Continue widget on it - bool _isRerunAvailable; // FUN_00959fa0 sets byte Manager+0x20d91 (=_gamestate+0x1fded) to 1 when GameState::read_rerun 009d7d50 succeeds, else GameState::DeleteRerun; Menu_Game::Update 00981140 also enables Continue on it - uint8_t _pad_0x1fdee[0x36]; - uint32_t _saveFile; // void* // Manager::save_game_state 00958ed0 / save_rerun_to_steam_cloud 00959180 delete the old object (vtbl[0](1)), store SaveDataManager::open_file_write result at Manager+0x20dc8 (=_gamestate+0x1fe24), pass it to GameState::write and call vtbl+0x30/+0x34 (flush/close); GameState::read_player 009cb620 reads via this+0x1fe24 (REPENTOGON GameState _saveFile, last member) -}; -static_assert(offsetof(GameState, _isSaveAvailable) == 0x1fdec); -static_assert(offsetof(GameState, _isRerunAvailable) == 0x1fded); -static_assert(offsetof(GameState, _saveFile) == 0x1fe24); - -struct GlowingHourglassState { - bool _isUsable; // Game::GetGlowingHourglassState 00706780 returns the slot only when its first byte is set; Game::save_rewind_state 00705ee0 sets *slot = 1 after storing - uint8_t _pad_0x1[0x3]; - GameState _gameState; // Game::save_rewind_state 00705ee0 calls store_game_state(game, slot+4); GameState is 0x1fe28 bytes (last member _saveFile at 0x1fe24), so it ends at 0x1fe2c - int _leaveDoor; // Game::save_rewind_state 00705ee0 stores its arg (the door slot, from Room::update_door_transitions 007f01c0; -1 otherwise) at slot+0x1fe2c and returns early if the same door is passed again (REPENTOGON 0x1fca4: drifted +0x188) - uint32_t _timeCounter; // Game::save_rewind_state 00705ee0 stores Game _frameCount at slot+0x1fe30 and skips a new save within 0xf frames of it (REPENTOGON 0x1fca4+4: drifted +0x188) - int _eventCounters[523]; // Game::save_rewind_state 00705ee0 copies 0x20b dwords of PersistentGameData _eventCounters to slot+0x1fe34; ends at 0x20660 = the slot stride (eh-vector ctor 0x20660 x2, GetGlowingHourglassState) (REPENTOGON 0x1fcac: drifted +0x188) -}; -static_assert(offsetof(GlowingHourglassState, _isUsable) == 0x0); -static_assert(offsetof(GlowingHourglassState, _gameState) == 0x4); -static_assert(offsetof(GlowingHourglassState, _leaveDoor) == 0x1fe2c); -static_assert(offsetof(GlowingHourglassState, _timeCounter) == 0x1fe30); -static_assert(offsetof(GlowingHourglassState, _eventCounters) == 0x1fe34); - -struct ProceduralItemManager { - uint8_t _proceduralItems[0xc]; // std_vector_ProceduralItemPtr; begin/end at Game+0x67758/0x6775c: ItemPool::CreateGlitchedCollectible 009dcc70, Entity_Pickup::Update 006e3940, Isaac::SpawnLocust 005b35c0, reroll_collectibles_on_damage 005c88a0 index *(begin + ~id*4) bounded by (end-begin)>>2; ~ProceduralItemManager 009dc750 Tidy()s it at +0 - uint8_t _renderTarget[0x1c]; // KAGE_SmartPointer_RenderTargetBase; Entity_Pickup::load_collectible_gfx 006e1e90, Entity_Player::AnimateCollectible 007ab380, collectible_icon_render 00848c20, HUD::render_extra_hud call KAGE::SmartPointer::operator_assign(&Game+0x67764) to bind it for glitched items; ~ProceduralItemManager 009dc750 releases the ref at +0xc/+0x10 via g_renderTargetReleaseFn (ctor zeroes 0x67764/0x67768) - uint8_t _spawnTriggerTargets[0x8]; // std_set_TypeVariant; set of (type, variant or -1) keys (node 0x18, key uint type +0x10 / int variant +0x14): ~ProceduralItemManager 009dc750 erases the tree head at +0x28 (= Game+0x67780, allocated by Game ctor 006f1020 with size +0x2c); ItemPool::CreateGlitchedCollectible 009dcc70 inserts (FUN_009e24f0) a glitched item's trigger target when its trigger kind is 6; Game::SpawnEx 006fe410 and Entity_NPC::Render 0058a010 look up the spawned entity's (type,variant)/(type,-1) and fire trigger_set_dispatch(6,..) on a hit -}; -static_assert(offsetof(ProceduralItemManager, _proceduralItems) == 0x0); -static_assert(offsetof(ProceduralItemManager, _renderTarget) == 0xc); -static_assert(offsetof(ProceduralItemManager, _spawnTriggerTargets) == 0x28); - -struct KColor { - float _red; - float _green; - float _blue; - float _alpha; - int _unk; // KColor::KColor 00a0f690 and SetFromARGB 00a0f550 zero +0x10; Game:Fadein 006f5210 copies 5 dwords, Fadeout 006f5290 zeroes 0x265b4 (= _fadeOutColor+0x10); every KColor member in structs.hpp is followed by a 4-byte pad (KColor is 0x14) -}; -static_assert(offsetof(KColor, _red) == 0x0); -static_assert(offsetof(KColor, _green) == 0x4); -static_assert(offsetof(KColor, _blue) == 0x8); -static_assert(offsetof(KColor, _alpha) == 0xc); -static_assert(offsetof(KColor, _unk) == 0x10); - -struct RoomTransition { - uint8_t _pad_0x0[0x4]; - int _frame; // RoomTransition start 0082ee40 zeroes this+4; RoomTransition::Update 008318a0 compares it with this+8 and resets it on mode change; Game::Render 006fbc10 fades by Game+0x1b840 / Game+0x1b844 in modes 2/3; Game::interpolate_update steps the progress float +0xc by 0.5/duration while frame != duration - int _duration; // RoomTransition start 0082ee40 sets this+8 = 0x1e (or the per-type value); Update 008318a0 ends the phase when this+4 >= it; Game::Render 006fbc10 divides _frame by it - uint8_t _pad_0xc[0x4]; - int _direction; // RoomTransition::ChangeRoom 00830950 switches on it (0..3 door side offsets) and sets Game _leaveDoor=-1 when it is -1; RoomTransition::Update 008318a0 hides players when -1; FUN_00429570 / FUN_00707ad0 zero it - int _targetRoomIdx; // RoomTransition::ChangeRoom 00830950 Level::GetRoomByIdx(+0x14, +0x18) and Game::ChangeRoom(+0x14, +0x18); Update 008318a0 compares it with Game _currentRoomIdx - int _targetDimension; // RoomTransition::ChangeRoom 00830950 passes it as the dimension with _targetRoomIdx to GetRoomByIdx and Game::ChangeRoom - int _animation; // RoomTransition start 0082ee40 stores StartRoomTransition's type argument (<= 0x16) at this+0x1c; ChangeRoom / Update switch on it (3 teleport, 0xb, 0xc, 0xd, 0x11, 0x13 minecart, 0x14); FUN_00707ad0 restarts the transition after Level::Init when it is 3/0xb/0xc/0xd - uint8_t _pad_0x20[0x4]; - uint32_t _flags; // ? RoomTransition start 0082ee40 zeroes this+0x24; Level::generate_greed 0073e0a0 tests bit 0 (skip) and bit 1 (shop room: clear room flag 0x10) of Game+0x1b860 while a transition is active; FUN_00429570 / FUN_00707ad0 clear it with the rest of the transition - uint8_t _pad_0x28[0x10]; - ANM2 _versusScreenSprite; // Game::constructor 006f1020 ANM2::constructor(_roomTransition+0x38); RoomTransition::StartBossIntro 0082f1c0 loads/plays the versus screen on this+0x38 - uint8_t _pad_0x14c[0xd8]; - uint8_t _sprites[0x8]; // std_map_RoomTransitionSprite; ? std::map head +0x224 / size +0x228 of ANM2 values (node +0x14 = ANM2, its _loaded at node+0x11d): RoomTransition::StartBossIntro 0082f1c0 erases it (std::map::_Erase_tree) and resets the size; RoomTransition::Update 008318a0 updates every node's anim state - Vector _slideOffset; // ? RoomTransition::ChangeRoom 00830950 sets x (+0x22c) or y (+0x230) to the screen-width/height offset of the new room for the door direction (this+0x10 = 0..3) - uint8_t _minecart[0x4]; // EntityPtr; Entity_NPC::HandleCollision 006cd410: player touching a minecart (0x3c5.10) calls StartRoomTransition(..,0x13,..) then assigns the npc to Game+0x1ba70 with the EntityPtr multiset insert/erase; RoomTransition::Update 008318a0 reads this[0x8d] and moves it when it is still 0x3c5.10 - int _bossIntroBossId; // RoomTransition::StartBossIntro 0082f1c0 stores bossID1 in this+0x238; RoomTransition start 0082ee40 zeroes it; Update 008318a0 mode 2 waits on the versus-screen ANM2 when nonzero else changes room at once; Game::Render / PauseScreen::Render / update_ingame_input test Game+0x1ba74 != 0 (versus screen up) -}; -static_assert(offsetof(RoomTransition, _frame) == 0x4); -static_assert(offsetof(RoomTransition, _duration) == 0x8); -static_assert(offsetof(RoomTransition, _direction) == 0x10); -static_assert(offsetof(RoomTransition, _targetRoomIdx) == 0x14); -static_assert(offsetof(RoomTransition, _targetDimension) == 0x18); -static_assert(offsetof(RoomTransition, _animation) == 0x1c); -static_assert(offsetof(RoomTransition, _flags) == 0x24); -static_assert(offsetof(RoomTransition, _versusScreenSprite) == 0x38); -static_assert(offsetof(RoomTransition, _sprites) == 0x224); -static_assert(offsetof(RoomTransition, _slideOffset) == 0x22c); -static_assert(offsetof(RoomTransition, _minecart) == 0x234); -static_assert(offsetof(RoomTransition, _bossIntroBossId) == 0x238); - -struct StageTransition { - uint8_t _pad_0x0[0x4]; - int _frame; // Game::StartStageTransition tail (006fdf68) zeroes Game+0x1ba7c; StageTransition::Update 0092f1c0 increments in_ECX[1] each frame and resets it when it reaches in_ECX[2]; Game::Render 006fbc10 fades by frame/duration in states 2/3; start_pending_game sets 0x31 of 0x32 - int _duration; // Game ctor 006f1020 and Manager::start_pending_game 00959720 set Game+0x1ba80 = 0x32; StageTransition::Update 0092f1c0 sets 0xf and ends the phase when _frame >= it; Game::Render divides by it -}; -static_assert(offsetof(StageTransition, _frame) == 0x4); -static_assert(offsetof(StageTransition, _duration) == 0x8); - -struct Seeds { - bool _isCustomRun; // 006b83d0 (Lua Seeds:IsCustomRun binding, misnamed Room::IsInitialized) returns *(byte*)this; 009e9290 ctor / 009e9bc0 Reset clear byte 0 - uint8_t _pad_0x1[0x3]; - uint32_t _gameStartSeed; // 00436140 Lua GetStartSeed returns [this+4] ("Game Start Seed was not set" if 0); 009eb880 set_start_seed writes it; 0085e180 ClearStartSeed zeroes it - RNG _rng; // 006ef890 Lua GetNextSeed steps xorshift seed this+8 with shifts +0xc/+0x10/+0x14; ctor inits 0xaa17414f,5,9,7; set_start_seed seeds it from start seed - uint32_t _stageSeeds[14]; // Lua Seeds:GetStageSeed 00738280 returns this+0x18+min(stage,13)*4 (so _rng at +8 is a 0x10 RNG, not 0x48; Seeds::GetNextSeed 006ef890 shifts are +0xc/+0x10/+0x14) - uint32_t _playerInitSeed; - uint32_t _seedEffects; // void* // std::set head ptr (new vs REPENTOGON): 009e9290 ctor allocs 0x14-byte tree head at this+0x54; 00685e70 ClearSeedEffects erases tree this+0x54 then count +0x58=0 - int _seedEffectsCount; // 0085e1b0 Lua CountSeedEffects returns this+0x58; ClearSeedEffects zeroes it -}; -static_assert(offsetof(Seeds, _isCustomRun) == 0x0); -static_assert(offsetof(Seeds, _gameStartSeed) == 0x4); -static_assert(offsetof(Seeds, _rng) == 0x8); -static_assert(offsetof(Seeds, _stageSeeds) == 0x18); -static_assert(offsetof(Seeds, _playerInitSeed) == 0x50); -static_assert(offsetof(Seeds, _seedEffects) == 0x54); -static_assert(offsetof(Seeds, _seedEffectsCount) == 0x58); - -struct OnlineStatsScreen { - bool _isActive; // Game::End 006f9770 calls online_stats_finalize only while byte Game+0x25954 == 0; Game::Update / update_ingame_input return early and PauseScreen is not updated while it is set; StageTransition::Update skips Game::End while set; update_ingame_input clears it after the continue vote; Game::Exit clears it - uint8_t _pad_0x1[0x567]; - uint8_t _players[0xc]; // std_vector_OnlineStatsPlayer; ? 0x38-byte records (controller id +0, std::string name +8): online_stats_finalize 008ca600 clears and _Emplace_reallocates them at +0x568/+0x56c/+0x570; Game::Exit 006fa0c0 and update_ingame_input 006fa540 destroy them (Game+0x25ebc) when closing the screen -}; -static_assert(offsetof(OnlineStatsScreen, _isActive) == 0x0); -static_assert(offsetof(OnlineStatsScreen, _players) == 0x568); - -struct Game { - uint32_t _stage; // Level:GetStage binding (0040c3a0) returns *this; Game:GetLevel (00424530) returns this, so Level*==Game* - uint32_t _stageType; // Level:GetStageType (004073c0) returns this+4; Level::IsAltStage (0042a2c0) tests it !=0 - bool _bossChallenge; // Level::HasBossChallenge (0085e160) returns byte this+8 - bool _devilRoomDisabled; // Level::IsDevilRoomDisabled (007e9250) reads, Level::DisableDevilRoom (007e9260) sets byte this+9=1 - uint8_t _pad_0xa[0x2]; - uint32_t _curses; // Level::GetCurses (00748490) ORs this+0xc with forced curses; Level::RemoveCurses (00748bc0) clears bits in it - uint8_t _pad_0x10[0x4]; - RoomDescriptor _roomList[527]; // Level*==Game*: Level::GetRoomByIdx 00740bc0 returns this+0x14+n*0xb8, n < 0x20f - int _roomMap[507]; // Level*==Game*: Level::GetRoomByIdx 00740bc0 indexes this+0x17adc+(dimension*0xa9+idx)*4 - uint32_t _currentRoomMap; // int* // Level*==Game*: Level::ChangeRoom 0073fc80 sets it to this+0x17adc+dimension*0x2a4 - uint32_t _nbRooms; // Level::GetRoomCount (0056ff80) returns it; Level::GetRoomByIdx (00740bc0) loops rooms up to it - uint32_t _startingRoomIdx; // Level::GetStartingRoomIndex (00505c70) returns it - RNG _generationRNG; // Game ctor (006f1020) inits RNG (seed 0xaa17414f, shifts 5/9/7); Level::Init (00744940) seeds+steps it; used by Level::place_special_rooms/generate_dungeon/generate_mineshaft - RNG _devilAngelRoomRNG; // Level:GetDevilAngelRoomRNG (007537f0) returns this+0x182e4; ctor/Level::Init init it as 2nd RNG; Level::InitializeDevilAngelRoom uses it (not in REPENTOGON) - float _angelRoomChance; // Level::GetAngelRoomChance (007e9270) returns float; Level::AddAngelRoomChance (0065cf00) adds to it (not in REPENTOGON) - uint8_t _pad_0x182f8[0x8]; - uint32_t _room; // Room* // Level::GetCurrentRoom (00407480) returns it; RemoveCurses uses it +0x1218 as EntityList - uint32_t _currentRoomIdx; // Level::GetCurrentRoomIndex lua field; Game::GetCurrentRoomDesc (00740db0) passes it to GetRoomByIdx - uint32_t _lastRoomIdx; // Level::GetPreviousRoomIndex lua field; Level::GetLastRoomDesc (00740dd0) passes it to GetRoomByIdx - uint32_t _currentDimensionIdx; // Level::GetRoomByIdx (00740bc0) uses it as default dimension; Game::GetCurrentRoomDesc passes it with _currentRoomIdx - uint32_t _lastRoomDimensionIdx; // Level::GetLastRoomDesc (00740dd0) passes it as dimension with _lastRoomIdx - uint32_t _lastBossRoomListIdx; // Level::GetLastBossRoomListIndex lua field - uint32_t _leaveDoor; // Level::LeaveDoor lua field - uint32_t _enterDoor; // Level::EnterDoor lua field - Vector _dungeonReturnPosition; // Lua Level:DungeonReturnPosition 0085e140 returns Game+0x18320/+0x18324; Level::GetEnterPosition 0074a090 returns it when re-entering _dungeonReturnRoomIndex from a crawlspace; GridEntity_Stairs::Update 0099bd50 / ENTITY_ROTGUT_face 0057bec0 set it; Level::Init sets 320 - int _dungeonReturnRoomIndex; // Level*==Game*: Level::GetEnterPosition 0074a090 compares _currentRoomIdx with Game+0x18328 (Level._dungeonReturnRoomIndex) before using _dungeonReturnPosition - uint32_t _dungeonPlacementSeed; // Level::GetDungeonPlacementSeed (0060d000) returns it - uint8_t _pad_0x18330[0x4]; - uint32_t _greedModeWave; // Level::GreedModeWave (0070c5b0) returns it - uint32_t _greedWaveSeeds[12]; // Level::generate_greed (00743550) stores 12 generation-RNG draws here after placing the rooms; Room::SpawnGreedModeWave (00816910) seeds the wave's GetRandomRoom from roomMap[wave+0x216] (the same dwords) - int _greedLastBeatenWave; // Room::TriggerClear (008068f0) and Room::UpdateGreedWave (00801ee0, no enemies and timer > 19) set it to _greedModeWave; Entity_Player::room_enter (007a6c50) rolls _greedModeWave back to it; Level::Init zeroes it - int _greedLastPaidWave; // Room::SpawnGreedModeWave (00816e57): coins, trigger_room_clear and locusts only when the new wave index is above it, then stores it; Level::Init zeroes it - uint32_t _greedModeTreasureRoomIdx; // level gen (0074399a etc.) sets it to 0x55; ItemPool::get_pool_from_room_entities (007ebe20): greed mode treasure room != this idx -> boss pool - int _greedWavesClearedWithoutRedHeartDamage; // Room::SpawnGreedModeWave (00816910) increments it, extra wave every 3; Level::SetRedHeartDamage (0074b5b0) zeroes it (REPENTOGON Level had 0x18204) - uint8_t _ventricleRazorPortals[24]; // Level*==Game*: FUN_0074a280 writes 2 x 0xc portal records (Ventricle Razor, UseActiveItem case 0x18c) - int _bombPickupsSpawned; // ? Game::BombTearflagEffects 007009a0: for the bomb flag set at DAT_00c34990.. spawns a random pickup (5.0) when rand%100 > it + 0x24, then increments it, so each drop lowers the chance; Level::Init 00744940 zeroes it per floor; Level::RestoreGameState restores it - uint8_t _pad_0x18394[0x8]; - uint32_t _levelStateFlags; // Level::GetStateFlag (004f88f0)/SetStateFlag (00428a80) test/set bit in this+0x1839c - bool _isLevelGenerating; // Level::Init 00744940 sets byte Game+0x183a0 = 1 (00744aec) before generating and clears it at the end (00745a67); Level::CanSpawnTrapDoor 0074b5d0 and Level::GetRoomStageType 0074f690 branch on it; Entity_Player::room_enter 007a6c50 skips spawn_low_health_blood_splat and FUN_00823540 skips the colour-modifier lerp while set - uint8_t _pad_0x183a1[0x3]; - uint8_t _myosotisPickups[0xc]; // vector_EntitySaveState; Room::Update (00802980) if non-empty calls FUN_00752830 on it then checks trinket 0x89 (Myosotis); ctor zeroes 0x183a4..0x183ac - uint8_t _pad_0x183b0[0x560]; - RoomConfig _roomConfig; // Game ctor builds 0x25 RoomConfigStage at it; Level::ForceHorsemanBoss (007481d0) and FUN_00745b70 call RoomConfig::GetRoomByStageTypeAndVariant with ECX=Game+0x18910 - uint8_t _pad_0x1a570[0x1c8]; - uint8_t _preloadManager[0x8]; // PreloadManager; Game::LoadConfigXmls 006f4740 calls load_preloads_xml 009c6860 with ECX=Game+0x1a738; ctor builds a std::map head (new 0x50, color 0x101) at +0 and size +4 right after RoomConfig's inline ctor ends at RoomConfig+0x1e24; PlayerManager::enter_level looks up group "player tears" in that map for PreloadManager::load_group (so _roomConfig is 0x1e28, not 0x1e30) - ItemPool _itemPool; - uint8_t _pad_0x1aee4[0x8c]; - BossPool _bossPool; // Game ctor (006f1020) builds 0x25 x 0x3c BossPool_Pool at Game+0x1af70 (~Game destroys them); Level::place_special_rooms / generate_boss_room / TryInitializeExtraBossRoom call BossPool::GetBossId with ECX=Game+0x1af70 - uint8_t _pad_0x1b82c[0x10]; - RoomTransition _roomTransition; // BossOverlay::update / FUN_00429570 call RoomTransition::Update with ECX=Game+0x1b83c; ctor builds the versus-screen ANM2 at +0x38 (0x1b874); Game::IsPaused / many AIs test its mode dword != 0 - StageTransition _stageTransition; // StageTransition::Update (0092f1c0) runs with this=Game+0x1ba78; Game::Update/Render/IsPaused and Entity_Player shooting/pocket-use test the state dword != 0 (PlayerManager::Update next to _roomTransition) - uint8_t _pad_0x1ba84[0x14]; - RNG _fortuneRNG; // Lua Game:ShowFortune 005b1870 and FUN_0065d070 ("Fortune_Seeds") pass this+0x1ba98 as the RNG to Game::ShowFortuneText 009807a0; ctor 006f1020 seed 0xaa17414f shifts 5/9/7 at +0x1ba9c..+0x1baa4; Game::Start 006f5320 reseeds from Seeds::GetNextSeed; store_game_state saves it - PlayerManager _playerManager; - Seeds _seedEffects; // Lua Game:GetSeeds (0042a340) returns this+0x1bb84; ctor calls Seeds::constructor there; Seeds::AchievementUnlocksDisallowed called with ECX=Game+0x1bb84 - uint8_t _onlinePlayerStats[0xc]; // std_vector_OnlinePlayerStats; ? 0x68-byte records (uint64 user id at +0, 0x16 dword counters from +0xc): FUN_0065d090 returns &Game+0x1bbe0 for Player_stats_add (Entity_Player::TakeDamage, Entity_Slot::Update revive); online_stats_finalize 008ca600 walks begin/end (/0x68) logging "Finalized stats for user %llu"; write_game_state_to_stream 009172f0 writes the count and records; Game::Start / LoadConfigXmls clear it (end=begin); ctor zeroes 0x1bbe0..0x1bbe8 right after Seeds::constructor (Seeds is 0x5c, ends here) - uint8_t _pad_0x1bbec[0x448]; - ItemOverlay _itemOverlay; - uint8_t _pad_0x1d2ec[0x234]; - GameOver _gameOver; // Game::Render (006fbc10) calls GameOver::Render (00998880) with ECX=Game+0x1d520; ctor builds it after ItemOverlay - uint8_t _pad_0x1d640[0x10]; - Leaderboard _leaderboard; // Game::Update (006fadc0) calls Leaderboard::Update (00857450) with ECX=Game+0x1d650; ctor calls its ctor 00856f70 there - uint8_t _pad_0x1d658[0x3ac]; - HUD _hud; - uint8_t _pad_0x2365c[0x418]; - PauseScreen _pauseScreen; // Game ctor calls PauseScreen::constructor (009b5320) on Game+0x23a74; Game::Update/Render test state dword there and render it when !=0 - uint8_t _pad_0x24a24[0x4a8]; - uint8_t _revivePlayerMenu[0x240]; // RevivePlayerMenu; Game::LoadConfigXmls (006f4740) calls RevivePlayerMenu::Init (008ef560) with ECX=Game+0x24ecc; Game::Render calls 008efe10 on it (not in REPENTOGON) - int _emoteMenuState; // ? +4 of an unnamed online emote-menu object at Game+0x25108 (ctor: byte +0, dword +4, OnlineEmotes::constructor at +8): FUN_008d1f20 runs it as 0 closed / 1 opening / 2 open / 3 closing; online_chat_update 0091dc10, PauseScreen::Update 009b5d20 and input filter FUN_00900ca0 are blocked while != 0; Game::Exit and the menu reset zero it (not part of _revivePlayerMenu, which ends at 0x25108) - uint8_t _pad_0x25110[0x844]; - OnlineStatsScreen _onlineStatsScreen; // ? Game ctor builds it at Game+0x25954 (byte +0, ANM2 +4 = 0x25958, ANM2[4] at 0x25a6c); online_stats_finalize 008ca600, CompletionWidget::Load 008ca2c0, netplay_lobby_render 008caa30, ~OnlineStatsScreen 008ca220 all run with ECX=Game+0x25954 (not part of _revivePlayerMenu) - uint8_t _pad_0x25ec8[0x4]; - Minimap _minimap; // HUD::Render (009a3eb0) calls Minimap::Render with ECX=Game+0x25ecc; LoadConfigXmls calls Minimap::Init on it; 8 Minimap::Refresh calls on it - int _freezeFrames; // Game::Update 006fadc0 decrements it while >0 and returns right after HUD::PostUpdate (no game update); Game::IsPaused 006fd350 returns 1 while >0; reset_run_state 006f43b0 zeroes it - int _frameCount; - int _timeCounter; // Lua Game.TimeCounter via binder 008952b0: getter 008c2850 FUN_0085bfd0 signed dword, setter dword - int _bossRushParTime; - int _blueWombParTime; - int _screenShakeTimer; // Lua Game:ShakeScreen 00703670 writes the timeout; Game::Update 006fadc0 counts down, zeroes _screenShakeOffset at 0; Camera::update_follow 009446e0 scales shake by timer/11 - Vector _screenShakeOffset; - int _darknessTimeout; // Lua Game:Darken 00440ee0 writes param 2; Game::Update 006fadc0: while >0 decrement and raise +0x26518 by 1/21, else lower it by 1/30 - float _darknessModifier; // Game::GetDarknessModifier 00440610 returns it; Game::Update 006fadc0 ramps it 0..1 by _darknessTimeout; renderer uses 1 - _darknessStrength*it*0.96 - float _darknessStrength; // Lua Game:Darken 00440ee0 writes param 1; multiplied with _darknessModifier in Room::render_darkness_overlay 00825de0 - uint8_t _giantBookClickerImage[8]; // image handle (+0 ptr, +4 owner): Game::Render 006fbc10 loads gfx/ui/giantbook/GiantBook_Clicker.png into it when null; ~Game 006f3060 releases it - int _bloomTimer; // Game::SetBloom 00703830 sets it = Time; Game::Update 006fadc0 counts it down; Game::Render 006fbc10 bloom pass while >0, intensity sin(1-|t-dur/2|/(dur/2)) - int _bloomDuration; // Game::SetBloom 00703830 sets it = Time; Game::Render 006fbc10 uses it as the total for the bloom curve - float _bloomStrength; // Game::SetBloom 00703830 stores the XMM2 Strength; Game::Render 006fbc10 multiplies the bloom curve by it - bool _triggerWindowResize; // window-size handler FUN_00954150 (width/height scale recompute) sets byte Game+0x26534=1; Game::Render (006fbc10) at entry calls FUN_007084c0 (render-surface rebuild) when set and clears it; ctor zeroes it - uint8_t _pad_0x26535[0x3]; - int _hallucinationTimer; // Lua Game:ShowHallucination 007059f0 sets it; HasHallucination 004a5d00 returns >0; Game::Update 006fadc0 counts it down; Game::Render 006fbc10 draws the effect while >0 - int _hallucinationDuration; // ShowHallucination 007059f0 sets it with the timer; Game::Render 006fbc10 fades by (timer - duration + 20) - bool _isRoomSnapshotTaken; // ? Game::Render 006fbc10 renders into render target DAT_00c797a4 30 frames after room entry (or 1 in 3 by room seed when already set) and sets it to 1; ResetState 006f4520 clears it - uint8_t _pad_0x26541[0x3]; - uint32_t _debugFlags; // console debug toggles: FUN_00685f10 sets bit n in Game+0x26544; Entity::PostRender bit 0 (entity positions), bit 5 hitspheres (Entity_Laser/Knife/Brimstone), bit 0xd render_debug_lua_memory (debug 14) - uint64_t _gameStateFlags; // Game::GetStateFlag (004217a0) tests bit in qword this+0x26548+(n>>6)*8; Level::place_special_rooms / GridEntity_Door::SetLocked / Entity_Slot::TakeDamage set bits there - uint32_t _debugCurses; // Level::GetCurses 00748490 returns ~prevented & (forced | Game+0x26550 | _curses); FUN_00685f50 (only caller Console::RunCommand 'curse' command) stores its argument there; reset_run_state 006f43b0 zeroes it; NpcAI::ENTITY_MOLE, Entity_Slot::SetPrizeType, setup_loot_preview OR it into the curse mask the same way - int _lastDevilRoomStage; - int _treasureRoomsVisited; // Lua Game:GetTreasureRoomVisitCount (007383a0) returns this+0x26558, Lua AddTreasureRoomsVisited (007e9370) increments it; Room::Init (007f2800) increments it on entering a treasure room - int _planetariumsVisited; // Room::Init (007f2800) increments Game+0x2655c on first visit of room type 0x18 (planetarium); Game::GetPlanetariumChance (0074dbd0) tests it == 0; ResetState zeroes it; store_game_state saves it - int _stagesWithoutHeartsPicked; - int _stagesWithoutDamage; - int _devilRoomDeals; - int _donationModGreed; - int _donationModAngel; - int _reviveMachineCoinsLeft; // Revive Machine (slot 6.19) in Entity_Slot::Update 0065d950 on "CoinInsert": FUN_00704b50 decrements it, revives ghosts when FUN_0065d010 (getter) < 1, then FUN_0065d020 resets it to 10 + min(2*0x26578, 10); Game::ResetState 006f4520 = 10; store_game_state saves it - int _reviveMachineUses; // FUN_0065d040 increments it after a Revive Machine revive (Entity_Slot::Update 0065d950); FUN_0065d020 uses it to raise the coin cost; ResetState 006f4520 = 0; store_game_state saves it - int _shopVisits; // moved from 0x26574: Room::Init (007f2800 at 007f36f4) increments Game+0x2657c when room type == 2 (shop) and unlocks achievement 0x17b (School Bag) once >= 6 outside greed difficulties (matches REPENTOGON Lua AddShopVisits logic); 0x26574 is a slot coin countdown (reset to 10, decremented on CoinInsert) - uint32_t _entityFactory; // EntityFactory* // Game ctor stores EntityFactory::constructor result at Game+0x26580; Game::SpawnEx (006fe410) and ~20 spawners call EntityFactory::Create(*(Game+0x26580),...); ~Game frees it - uint32_t _challenge; - bool _isRerun; // FUN_006f72f0 (start a game from saved start params, copies their Seeds) sets byte Game+0x26588=1, LoadConfigXmls clears it, store/restore_game_state save it; Game::StartDebug / Entity::AddCharmed require it == 0 next to Seeds::AchievementUnlocksDisallowed before achievement unlocks - bool _isDebug; // Game::StartDebug (006f7750) sets byte Game+0x26589=1; Entity::AddCharmed tests _dailyChallenge._id==0 && it==0 before unlocks - bool _isStarted; // Game::Start 006f5320, StartDailyChallenge 006f6dd0, StartDebug 006f7750, FUN_006f72f0 (rerun start) and Manager::start_pending_game 00959720 set byte Game+0x2658a = 1; Game::Exit 006fa0c0 returns at once when it is 0 (nothing to save); ctor zeroes the word 0x2658a - uint8_t _pad_0x2658b[0x1]; - KColor _fadeInColor; // Lua Game:Fadein 006f5210 copies a KColor (5 dwords 0x2658c..0x2659c), alpha +0xc (0x26598) set 1.0; Game::Update 006fadc0 lowers alpha by _fadeSpeed; Render 006fbc10 draws the quad while alpha > 0 - bool _isFadeInIconShown; // ? Fadein 006f5210 param 2 / FUN_00707ad0 sets 1; Game::Render 006fbc10 calls FUN_009522b0 (frame%16 animated icon) during the fade-in - uint8_t _pad_0x265a1[0x3]; - KColor _fadeOutColor; // Lua Game:Fadeout 006f5290 copies the KColor to 0x265a4..0x265b4 and adds speed to its alpha (0x265b0); Game::Update 006fadc0 raises alpha to 1 then acts on _fadeOutTarget - float _fadeSpeed; // Fadein 006f5210 / Fadeout 006f5290 store the speed; Game::Update 006fadc0 steps the fade alphas by it - int _fadeOutTarget; // Game::Fadeout 006f5290 stores the target (<= 0xb, "Invalid target specified to Game::Fadeout()"); Game::Update 006fadc0 switches on it when the fade completes - int _framesSinceRoomTransition; // Game::Update 006fadc0 increments it each normal frame and zeroes it while a RoomTransition is active; FUN_00708350 returns true while < 8; ResetState/ctor zero it - uint8_t _restartHoldFrames; // Manager::update_ingame_input 006fa540 increments this byte each frame ACTION_RESTART (0x12) is held (0 when released), restarts the run once >= 0x10 (not in dailies / Eden); Game::reset_run_state 006f43b0 zeroes it - uint8_t _pad_0x265c5[0x3]; - Ambush _ambush; - uint8_t _pad_0x265f0[0x24]; - DeathmatchManager _deathmatchManager; // ctor 006f1020 zeroes 0x26614..0x2662c then calls DeathmatchManager::set_type 00429be0 (this+0xc = 0x26620 gets new DeathmatchType{Normal,Ipecac,Bomberman,Ludovico..}, ~Game deletes 0x26620); +0 mode int: Game::End returns if >1 and !=6, Game::Render calls 0x26620 vtable +0x14/+0x18 when ==4, ~150 sites treat players as enemies when >1; FUN_008cb0f0 resets +0/+4. Ends at _dailyChallenge 0x26630 (Ambush 0x265c8 is 0x4c) - uint8_t _pad_0x26624[0xc]; - DailyChallenge _dailyChallenge; // Game::StartDailyChallenge(DailyChallenge*) (006f6dd0) copies _id/_seed/_isPractice/_specialDailyId into Game+0x26630/34/38/3c; Game::IsChallengeOrDaily (006dae20) tests +0x26630 != 0 - uint8_t _scoreSheet[0x90]; // ScoreSheet; Minimap::render_score_time (0098ef30, at 0098f62a) calls ScoreSheet::Calculate (009e5d90) with ECX=Game+0x266e4; Game::StartStageTransition passes Game+0x266e4 to FUN_009e5a30 - int _victoryLap; - GenericPrompt _genericPrompt; // Game::LoadConfigXmls / ReloadStagesXmlOnLuaReset call GenericPrompt::Initialize(Game+0x26778); Game::Render calls GenericPrompt::Render and Room::SpawnClearAward GenericPrompt::Show on it - ANM2 _completionWidgetSprite; // Game::LoadConfigXmls 006f4740 and ReloadStagesXmlOnLuaReset 006f3c00 load gfx/ui/completion_widget.anm2 there; ctor ANM2::constructor; Game::Render 006fbc10 renders it after GenericPrompt::Render; Menu_Options::Update 009b23a0 resets it (GenericPrompt 0x26778 is 0x134 in REPENTOGON, ending here) - int _lastLevelWithoutHalfHp; - int _stageNameNumeral; // ? Level::GetName 007460b0 passes it to get_stage_display_name 00745ca0, which appends it as a roman numeral (table 00b6a950 M/CM/D..) plus "?","?!","..."," Spikes","... Please stop." at 3/4/5/1001/x1000; ResetState 006f4520 = 1; StageTransition::Update alternates on its parity; store_game_state saves it; no writer besides ResetState found - uint32_t _difficulty; - int _lastLevelWithDamage; - bool _isConsoleUsedThisRun; // ? Game::Start 006f5320 / StartDebug 006f7750 / StartDailyChallenge 006f6dd0 copy Manager _isConsoleEnabled into it; StartFromRerunState 006f72f0 sets it when the rerun state flag or the console is on; store_game_state 006f9000 saves it; no other reader found - uint8_t _pad_0x269d1[0x3]; - uint8_t _encounteredBosses[12]; // std::vector<{int type, int variant}>: Lua Game:AddEncounteredBoss 00703470 pushes (8-byte stride 0x269d4/d8/dc), HasEncounteredBoss 00703510 / GetNumEncounteredBosses 0085e370 scan it - int _pixelationTimer; // Lua Game:AddPixelation 00753cc0 sets it to max(cur, arg); Game::Update 006fadc0 counts it down; Room::Render 0080f200 pixelation while >0 - int _pixelationDuration; // ? AddPixelation 00753cc0 writes the same max value; read by Room::Render 0080f200 as the total - bool _isInstantFadeIn; // Console::RunCommand (restart branch, FUN_00685ee0) sets 1 after Manager::RestartGame; Fadein 006f5210 / FUN_00707ad0 then start alpha at 1e-5 instead of 1.0; Game::Update 006fadc0 clears it when the fade ends - bool _isStartingFromState; // FUN_00959720 sets 1 around Game::restore_game_state..LuaEngine::PostGameStart then 0; Player::AddSoulHearts (00758d00) skips while set; reset_run_state zeroes - bool _isStoringGlowingHourglassState; // Game::save_rewind_state (00705ee0) sets 1 while storing the slot, 0 after, and bails if already set - bool _isRestoringGlowingHourglassState; // Entity_Player::RestoreGameState (007ae4b0) branches on it; save_rewind_state bails if set - GlowingHourglassState _glowingHourglassStates[2]; // Game ctor: vector ctor 2 x 0x20660 at Game+0x269ec; save_rewind_state writes Game+0x269ec+slot*0x20660 - int _currentGlowingHourglassSlot; // Game::save_rewind_state (00705ee0) reads/writes int index 0x19dab (=0x676ac) as the slot selecting the 0x20660 state - int _rewindsThisFloor; // ? Game::rewind 00706020 increments it on every Glowing Hourglass rewind; PlayerManager::trigger_level_start 009bb960 and Game::ResetState 006f4520 zero it - bool _shouldLerpColorModState; // Game::SetColorModifier (007067c0) sets 1 when lerp, 0 otherwise; Game::Update clears it when done - uint8_t _pad_0x676b5[0x3]; - ColorModState _currentColorModifier; // SetColorModifier copies target into it when not lerping; ctor inits 1,1,1,0,0,1 - ColorModState _targetColorModifier; // SetColorModifier copies the argument ColorModState into it - ColorModState _lerpColorModifier; // SetColorModifier stores |target-current|*rate per component into it - uint8_t _pad_0x67700[0x2c]; - uint8_t _debugRenderer[0x8]; // DebugRenderer; Game::Render (006fbc10) calls DebugRenderer::Render (0042dbb0) with ECX=Game+0x6772c; Game::Update expires its list entries - float _lightningIntensity; // Game::Update (006fadc0) decays it *0.75, zero below 0.05 - float _dizzyIntensity; // Game::Update moves it toward 0x6773c by step 0x67740 - float _dizzyTargetIntensity; // Game::Update: target that _dizzyIntensity approaches - float _dizzyIntensityChangeSpeed; // Game::Update: step size; reset_run_state (006f43b0) sets 0.001 - bool _isRoomRespawned; // Game::room_restart_flag_set 005b1890 sets 1 after D7's Room::RespawnEnemies; ScoreSheet::add_pickup_points 009e5ab0 and award_fly_kill_points 009e5c00 award nothing while set; Game::StartRoomTransition 006fd7c0 clears it; ctor/reset_run_state zero - uint8_t _pad_0x67745[0x3]; - int _magicSkinUses; // FUN_005b18b0 adds to it, called from Entity_Player::UseActiveItem 005b39d0 (Magic Skin case: spawn collectible, lose a heart container); FUN_005b18a0 getter; ItemPool::GetCollectible helper FUN_007333f0 returns Magic Skin (0x282) again with chance it*0.01 and 1/(4-it) unless owned / already in a room; reset_run_state zeroes, store_game_state saves it - uint8_t _erasedEntities[0xc]; // vector_ErasedEntities; Game::AddErasedEnemy (00707840) pushes {type,variant,subtype} (12 bytes) to vector at 0x6774c/0x67750; Game::ShouldEraseEnemy scans it - ProceduralItemManager _proceduralItemManager; // ItemPool::CreateGlitchedCollectible (009dcc70) indexes vector at Game+0x67758 by -1-id - int _ascentTimer; // Dad's Note white-out: set to 1 by the AddCollectible body 0x762675, counted up by Game::Update 0x6fb92e (shake n/6+2, StartStageTransition(0,5,0) past 0x59), Game::Render alpha n/90; notes/systems/ascent.md - uint8_t _pad_0x6778c[0x15e0]; - int _deathCertificateExitTimer; // Entity_Pickup::RemoveOtherOptions 006ee750 sets 0x5a when an option collectible (variant 100) is taken in dimension 2 (Death Certificate) and it is < 1; Game::Update 006fadc0 counts it down with _screenShakeTimer = 10 and at 0 (still in dimension 2) StartRoomTransition back (leaveDoor -1); Entity_Pickup::Update / Entity_Player::init_player_type_state test it > 0; ResetState zeroes, store_game_state saves it - bool _isPocketItemRewindSaved; // Entity_Player::pocket_use_input 007a3d30 calls Game::save_rewind_state(-1) then sets it 1 ("Action PillCard Triggered"); save_rewind_state 00705ee0 does nothing while it is set; Room::update_door_transitions 007f01c0 clears it after StartRoomTransition; ctor/ResetState/reset_run_state/LoadConfigXmls clear - uint8_t _pad_0x68d71[0x7]; - uint8_t _console[0x4]; // Console; Game::Render calls Console::Render (0068c2e0) and Manager::update_ingame_input calls Console::Update (0068b260) with ECX=Game+0x68d78; ctor layout matches (_input string +0x1c, deques +0x40/+0x54) -}; -static_assert(offsetof(Game, _stage) == 0x0); -static_assert(offsetof(Game, _stageType) == 0x4); -static_assert(offsetof(Game, _bossChallenge) == 0x8); -static_assert(offsetof(Game, _devilRoomDisabled) == 0x9); -static_assert(offsetof(Game, _curses) == 0xc); -static_assert(offsetof(Game, _roomList) == 0x14); -static_assert(offsetof(Game, _roomMap) == 0x17adc); -static_assert(offsetof(Game, _currentRoomMap) == 0x182c8); -static_assert(offsetof(Game, _nbRooms) == 0x182cc); -static_assert(offsetof(Game, _startingRoomIdx) == 0x182d0); -static_assert(offsetof(Game, _generationRNG) == 0x182d4); -static_assert(offsetof(Game, _devilAngelRoomRNG) == 0x182e4); -static_assert(offsetof(Game, _angelRoomChance) == 0x182f4); -static_assert(offsetof(Game, _room) == 0x18300); -static_assert(offsetof(Game, _currentRoomIdx) == 0x18304); -static_assert(offsetof(Game, _lastRoomIdx) == 0x18308); -static_assert(offsetof(Game, _currentDimensionIdx) == 0x1830c); -static_assert(offsetof(Game, _lastRoomDimensionIdx) == 0x18310); -static_assert(offsetof(Game, _lastBossRoomListIdx) == 0x18314); -static_assert(offsetof(Game, _leaveDoor) == 0x18318); -static_assert(offsetof(Game, _enterDoor) == 0x1831c); -static_assert(offsetof(Game, _dungeonReturnPosition) == 0x18320); -static_assert(offsetof(Game, _dungeonReturnRoomIndex) == 0x18328); -static_assert(offsetof(Game, _dungeonPlacementSeed) == 0x1832c); -static_assert(offsetof(Game, _greedModeWave) == 0x18334); -static_assert(offsetof(Game, _greedWaveSeeds) == 0x18338); -static_assert(offsetof(Game, _greedLastBeatenWave) == 0x18368); -static_assert(offsetof(Game, _greedLastPaidWave) == 0x1836c); -static_assert(offsetof(Game, _greedModeTreasureRoomIdx) == 0x18370); -static_assert(offsetof(Game, _greedWavesClearedWithoutRedHeartDamage) == 0x18374); -static_assert(offsetof(Game, _ventricleRazorPortals) == 0x18378); -static_assert(offsetof(Game, _bombPickupsSpawned) == 0x18390); -static_assert(offsetof(Game, _levelStateFlags) == 0x1839c); -static_assert(offsetof(Game, _isLevelGenerating) == 0x183a0); -static_assert(offsetof(Game, _myosotisPickups) == 0x183a4); -static_assert(offsetof(Game, _roomConfig) == 0x18910); -static_assert(offsetof(Game, _preloadManager) == 0x1a738); -static_assert(offsetof(Game, _itemPool) == 0x1a740); -static_assert(offsetof(Game, _bossPool) == 0x1af70); -static_assert(offsetof(Game, _roomTransition) == 0x1b83c); -static_assert(offsetof(Game, _stageTransition) == 0x1ba78); -static_assert(offsetof(Game, _fortuneRNG) == 0x1ba98); -static_assert(offsetof(Game, _playerManager) == 0x1baa8); -static_assert(offsetof(Game, _seedEffects) == 0x1bb84); -static_assert(offsetof(Game, _onlinePlayerStats) == 0x1bbe0); -static_assert(offsetof(Game, _itemOverlay) == 0x1c034); -static_assert(offsetof(Game, _gameOver) == 0x1d520); -static_assert(offsetof(Game, _leaderboard) == 0x1d650); -static_assert(offsetof(Game, _hud) == 0x1da04); -static_assert(offsetof(Game, _pauseScreen) == 0x23a74); -static_assert(offsetof(Game, _revivePlayerMenu) == 0x24ecc); -static_assert(offsetof(Game, _emoteMenuState) == 0x2510c); -static_assert(offsetof(Game, _onlineStatsScreen) == 0x25954); -static_assert(offsetof(Game, _minimap) == 0x25ecc); -static_assert(offsetof(Game, _freezeFrames) == 0x264f4); -static_assert(offsetof(Game, _frameCount) == 0x264f8); -static_assert(offsetof(Game, _timeCounter) == 0x264fc); -static_assert(offsetof(Game, _bossRushParTime) == 0x26500); -static_assert(offsetof(Game, _blueWombParTime) == 0x26504); -static_assert(offsetof(Game, _screenShakeTimer) == 0x26508); -static_assert(offsetof(Game, _screenShakeOffset) == 0x2650c); -static_assert(offsetof(Game, _darknessTimeout) == 0x26514); -static_assert(offsetof(Game, _darknessModifier) == 0x26518); -static_assert(offsetof(Game, _darknessStrength) == 0x2651c); -static_assert(offsetof(Game, _giantBookClickerImage) == 0x26520); -static_assert(offsetof(Game, _bloomTimer) == 0x26528); -static_assert(offsetof(Game, _bloomDuration) == 0x2652c); -static_assert(offsetof(Game, _bloomStrength) == 0x26530); -static_assert(offsetof(Game, _triggerWindowResize) == 0x26534); -static_assert(offsetof(Game, _hallucinationTimer) == 0x26538); -static_assert(offsetof(Game, _hallucinationDuration) == 0x2653c); -static_assert(offsetof(Game, _isRoomSnapshotTaken) == 0x26540); -static_assert(offsetof(Game, _debugFlags) == 0x26544); -static_assert(offsetof(Game, _gameStateFlags) == 0x26548); -static_assert(offsetof(Game, _debugCurses) == 0x26550); -static_assert(offsetof(Game, _lastDevilRoomStage) == 0x26554); -static_assert(offsetof(Game, _treasureRoomsVisited) == 0x26558); -static_assert(offsetof(Game, _planetariumsVisited) == 0x2655c); -static_assert(offsetof(Game, _stagesWithoutHeartsPicked) == 0x26560); -static_assert(offsetof(Game, _stagesWithoutDamage) == 0x26564); -static_assert(offsetof(Game, _devilRoomDeals) == 0x26568); -static_assert(offsetof(Game, _donationModGreed) == 0x2656c); -static_assert(offsetof(Game, _donationModAngel) == 0x26570); -static_assert(offsetof(Game, _reviveMachineCoinsLeft) == 0x26574); -static_assert(offsetof(Game, _reviveMachineUses) == 0x26578); -static_assert(offsetof(Game, _shopVisits) == 0x2657c); -static_assert(offsetof(Game, _entityFactory) == 0x26580); -static_assert(offsetof(Game, _challenge) == 0x26584); -static_assert(offsetof(Game, _isRerun) == 0x26588); -static_assert(offsetof(Game, _isDebug) == 0x26589); -static_assert(offsetof(Game, _isStarted) == 0x2658a); -static_assert(offsetof(Game, _fadeInColor) == 0x2658c); -static_assert(offsetof(Game, _isFadeInIconShown) == 0x265a0); -static_assert(offsetof(Game, _fadeOutColor) == 0x265a4); -static_assert(offsetof(Game, _fadeSpeed) == 0x265b8); -static_assert(offsetof(Game, _fadeOutTarget) == 0x265bc); -static_assert(offsetof(Game, _framesSinceRoomTransition) == 0x265c0); -static_assert(offsetof(Game, _restartHoldFrames) == 0x265c4); -static_assert(offsetof(Game, _ambush) == 0x265c8); -static_assert(offsetof(Game, _deathmatchManager) == 0x26614); -static_assert(offsetof(Game, _dailyChallenge) == 0x26630); -static_assert(offsetof(Game, _scoreSheet) == 0x266e4); -static_assert(offsetof(Game, _victoryLap) == 0x26774); -static_assert(offsetof(Game, _genericPrompt) == 0x26778); -static_assert(offsetof(Game, _completionWidgetSprite) == 0x268ac); -static_assert(offsetof(Game, _lastLevelWithoutHalfHp) == 0x269c0); -static_assert(offsetof(Game, _stageNameNumeral) == 0x269c4); -static_assert(offsetof(Game, _difficulty) == 0x269c8); -static_assert(offsetof(Game, _lastLevelWithDamage) == 0x269cc); -static_assert(offsetof(Game, _isConsoleUsedThisRun) == 0x269d0); -static_assert(offsetof(Game, _encounteredBosses) == 0x269d4); -static_assert(offsetof(Game, _pixelationTimer) == 0x269e0); -static_assert(offsetof(Game, _pixelationDuration) == 0x269e4); -static_assert(offsetof(Game, _isInstantFadeIn) == 0x269e8); -static_assert(offsetof(Game, _isStartingFromState) == 0x269e9); -static_assert(offsetof(Game, _isStoringGlowingHourglassState) == 0x269ea); -static_assert(offsetof(Game, _isRestoringGlowingHourglassState) == 0x269eb); -static_assert(offsetof(Game, _glowingHourglassStates) == 0x269ec); -static_assert(offsetof(Game, _currentGlowingHourglassSlot) == 0x676ac); -static_assert(offsetof(Game, _rewindsThisFloor) == 0x676b0); -static_assert(offsetof(Game, _shouldLerpColorModState) == 0x676b4); -static_assert(offsetof(Game, _currentColorModifier) == 0x676b8); -static_assert(offsetof(Game, _targetColorModifier) == 0x676d0); -static_assert(offsetof(Game, _lerpColorModifier) == 0x676e8); -static_assert(offsetof(Game, _debugRenderer) == 0x6772c); -static_assert(offsetof(Game, _lightningIntensity) == 0x67734); -static_assert(offsetof(Game, _dizzyIntensity) == 0x67738); -static_assert(offsetof(Game, _dizzyTargetIntensity) == 0x6773c); -static_assert(offsetof(Game, _dizzyIntensityChangeSpeed) == 0x67740); -static_assert(offsetof(Game, _isRoomRespawned) == 0x67744); -static_assert(offsetof(Game, _magicSkinUses) == 0x67748); -static_assert(offsetof(Game, _erasedEntities) == 0x6774c); -static_assert(offsetof(Game, _proceduralItemManager) == 0x67758); -static_assert(offsetof(Game, _ascentTimer) == 0x67788); -static_assert(offsetof(Game, _deathCertificateExitTimer) == 0x68d6c); -static_assert(offsetof(Game, _isPocketItemRewindSaved) == 0x68d70); -static_assert(offsetof(Game, _console) == 0x68d78); - -struct GameStateItemPool { - uint8_t _poolsItemWeights[0x174]; // std_vector_float; ItemPool::StoreGameState 007367d0 resizes the 31 vectors at state+0 (stride 0xc) to each pool's item count and copies each PoolItem weight (+8, stride 0x18) into them - uint32_t _bibleUpgrades[31]; // ItemPool::StoreGameState 007367d0 copies ItemPool _pools[i]._bibleUpgrade (pool+0x30) to state+0x174+i*4 (LEA EAX,[ECX+0x174] at 007367f0) - uint32_t _seed; // ItemPool::StoreGameState 007367d0 MOV [ECX+0x1f0], ItemPool+0 (seed) at 0073690a - int _lastPool; // ItemPool::StoreGameState 007367d0 MOV [ECX+0x1f4], ItemPool+0x650 (_lastPool) at 00736916 - uint32_t _itemPoolRNGseed; // ItemPool::StoreGameState 007367d0 MOV [ECX+0x1f8], ItemPool+0x654 (_itemPoolRNG seed) at 00736922 - uint32_t _trinketPoolRNGseed; // ItemPool::StoreGameState 007367d0 MOV [ECX+0x1fc], ItemPool+0x664 (_trinketPoolRNG seed) at 0073692e - float _unkFloat674; // ? ItemPool::StoreGameState 007367d0 MOV [ECX+0x200], ItemPool+0x674 (_unkFloat674) at 0073693a - float _unkFloat678; // ? ItemPool::StoreGameState 007367d0 MOV [ECX+0x204], ItemPool+0x678 (_unkFloat678) at 00736946 - uint8_t _removedCollectibles[0x10]; // vector_bool; ItemPool::StoreGameState 007367d0 resizes the vector at state+0x208 to ItemPool+0x688 bits and copies the _removedCollectibles bits (ItemPool+0x67c) - uint8_t _trinketPoolItems[0x10]; // vector_bool; ItemPool::StoreGameState 007367d0 resizes the vector at state+0x218 (ADD ECX,0x218 at 007369c8) to the trinket count and stores each TrinketPoolItem +4 (available) flag as a bit (REPENTOGON types it vector_TrinketPoolItem: it is a bit vector) - int _pillEffects[15]; // ItemPool::StoreGameState 007367d0 copies 15 dwords ItemPool+0x7a4 (pill effects) to state+0x228 (00736a39..00736a63) - bool _identifiedPillEffects[15]; // ItemPool::StoreGameState 007367d0 copies 15 bytes ItemPool+0x7e0 (identified flags, ItemPool::IdentifyPill 00718ea0 / IsPillIdentified 0083c490) to state+0x264 - uint8_t _pad_0x273[0x1]; - uint16_t _remainingGenesisItems[31]; // ItemPool::StoreGameState 007367d0 copies 31 words ItemPool+0x7f0 to state+0x274 (00736a65..00736a85); struct ends 0x2b4 (name from REPENTOGON, meaning unchecked) - uint8_t _pad_0x2b2[0x2]; -}; -static_assert(offsetof(GameStateItemPool, _poolsItemWeights) == 0x0); -static_assert(offsetof(GameStateItemPool, _bibleUpgrades) == 0x174); -static_assert(offsetof(GameStateItemPool, _seed) == 0x1f0); -static_assert(offsetof(GameStateItemPool, _lastPool) == 0x1f4); -static_assert(offsetof(GameStateItemPool, _itemPoolRNGseed) == 0x1f8); -static_assert(offsetof(GameStateItemPool, _trinketPoolRNGseed) == 0x1fc); -static_assert(offsetof(GameStateItemPool, _unkFloat674) == 0x200); -static_assert(offsetof(GameStateItemPool, _unkFloat678) == 0x204); -static_assert(offsetof(GameStateItemPool, _removedCollectibles) == 0x208); -static_assert(offsetof(GameStateItemPool, _trinketPoolItems) == 0x218); -static_assert(offsetof(GameStateItemPool, _pillEffects) == 0x228); -static_assert(offsetof(GameStateItemPool, _identifiedPillEffects) == 0x264); -static_assert(offsetof(GameStateItemPool, _remainingGenesisItems) == 0x274); - -struct GridEntityDesc { - int _type; - int _variant; - int _state; - int _spawnCount; - uint32_t _spawnSeed; - int _varData; - bool _initialized; - uint8_t _pad_0x19[0x3]; - uint32_t _variableSeed; -}; -static_assert(offsetof(GridEntityDesc, _type) == 0x0); -static_assert(offsetof(GridEntityDesc, _variant) == 0x4); -static_assert(offsetof(GridEntityDesc, _state) == 0x8); -static_assert(offsetof(GridEntityDesc, _spawnCount) == 0xc); -static_assert(offsetof(GridEntityDesc, _spawnSeed) == 0x10); -static_assert(offsetof(GridEntityDesc, _varData) == 0x14); -static_assert(offsetof(GridEntityDesc, _initialized) == 0x18); -static_assert(offsetof(GridEntityDesc, _variableSeed) == 0x1c); - -struct GridEntity { - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; -}; -static_assert(offsetof(GridEntity, _desc) == 0x4); -static_assert(offsetof(GridEntity, _varData) == 0x18); -static_assert(offsetof(GridEntity, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity, _rng) == 0x2c); -static_assert(offsetof(GridEntity, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity, _sprite) == 0x40); -static_assert(sizeof(GridEntity) == 0x154); - -struct GridEntity_Decoration { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; -}; -static_assert(offsetof(GridEntity_Decoration, _desc) == 0x4); -static_assert(offsetof(GridEntity_Decoration, _varData) == 0x18); -static_assert(offsetof(GridEntity_Decoration, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Decoration, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Decoration, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Decoration, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Decoration, _sprite) == 0x40); -static_assert(sizeof(GridEntity_Decoration) == 0x154); - -struct GridEntity_Door { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - uint8_t _sprite[0x94]; // ANM2 - Vector _spriteOffset; - uint8_t _pad_0xdc[0x78]; - int _updateCount; // ? GridEntity_Door::Update 0070c5c0 increments it every update; BeginBatches 00711590 zeroes it - int _slot; - int _currentRoomType; // Lua GridEntityDoor.CurrentRoomType via binder 0088bb60: getter 008c09b0 FUN_0085bfd0 signed dword, setter dword - int _targetRoomType; // Lua GridEntityDoor.TargetRoomType via binder 0088bb60: getter 008c09b0 FUN_0085bfd0 signed dword, setter dword - int _direction; - ANM2 _sparkleSprite; // LoadSprite 0070d3f0 loads gfx/door_sparkle.anm2 into +0x168; Update 0070c5c0 plays "Sparkle" on it (Rewind of its AnimationState +0x198); Render 0070d1e0 renders it; Free 0070bb20 resets it - ANM2 _extraSprite; - bool _isExtraVisible; // Lua GridEntityDoor.ExtraVisible via binder 0088be50: getter 008c0c10 pushboolean(byte), setter toboolean -> bool - bool _isBusted; - bool _isUnlockedByPlayer; // TryUnlock 00710480 sets it after the player pays a key/coin; Update 0070c5c0 keeps a challenge door (target type 11) open only while it is set; Open 00710dd0 tests it; BeginBatches 00711590 clears it - uint8_t _pad_0x393[0x1]; - int _targetRoomIdx; // Lua GridEntityDoor.TargetRoomIndex field+0x394; Room::update_door_transitions (007f01c0) and Entity_NPC::HandleCollision read door+0x394 and, when < -99, resolve it with Level::GetRoomByIdx for the target room's Dimension/GridIndex - uint32_t _previousState; - uint32_t _previousVariant; - uint32_t _doorFlags; // ? GridEntity_Door::LoadSprite 0070d3f0 zeroes it then ORs style bits by room type (1, 2, 4, 8, 0x10 with the "Break" anims, 0x20 with "Collapse", 0x40); SetRoomTypes / Open / TryUnlock / Update / Entity_Effect::update_mr_me / Entity_Familiar::ai_wisp test bits 1/0x10/0x20/0x50 - uint8_t _openAnimation[0x18]; // std_string; Lua GridEntityDoor.OpenAnimation via binder 0088c2d0: getter 008c0f40 lua_pushlstring of MSVC std::string (SSO cap>0xf), setter std::string::assign - uint8_t _closeAnimation[0x18]; // std_string; Lua GridEntityDoor.CloseAnimation via binder 0088c2d0: getter 008c0f40 lua_pushlstring of MSVC std::string (SSO cap>0xf), setter std::string::assign - uint8_t _lockedAnimation[0x18]; // std_string; Lua GridEntityDoor.LockedAnimation via binder 0088c2d0: getter 008c0f40 lua_pushlstring of MSVC std::string (SSO cap>0xf), setter std::string::assign - uint8_t _openLockedAnimation[0x18]; // std_string; Lua GridEntityDoor.OpenLockedAnimation via binder 0088c2d0: getter 008c0f40 lua_pushlstring of MSVC std::string (SSO cap>0xf), setter std::string::assign -}; -static_assert(offsetof(GridEntity_Door, _desc) == 0x4); -static_assert(offsetof(GridEntity_Door, _varData) == 0x18); -static_assert(offsetof(GridEntity_Door, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Door, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Door, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Door, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Door, _sprite) == 0x40); -static_assert(offsetof(GridEntity_Door, _spriteOffset) == 0xd4); -static_assert(offsetof(GridEntity_Door, _updateCount) == 0x154); -static_assert(offsetof(GridEntity_Door, _slot) == 0x158); -static_assert(offsetof(GridEntity_Door, _currentRoomType) == 0x15c); -static_assert(offsetof(GridEntity_Door, _targetRoomType) == 0x160); -static_assert(offsetof(GridEntity_Door, _direction) == 0x164); -static_assert(offsetof(GridEntity_Door, _sparkleSprite) == 0x168); -static_assert(offsetof(GridEntity_Door, _extraSprite) == 0x27c); -static_assert(offsetof(GridEntity_Door, _isExtraVisible) == 0x390); -static_assert(offsetof(GridEntity_Door, _isBusted) == 0x391); -static_assert(offsetof(GridEntity_Door, _isUnlockedByPlayer) == 0x392); -static_assert(offsetof(GridEntity_Door, _targetRoomIdx) == 0x394); -static_assert(offsetof(GridEntity_Door, _previousState) == 0x398); -static_assert(offsetof(GridEntity_Door, _previousVariant) == 0x39c); -static_assert(offsetof(GridEntity_Door, _doorFlags) == 0x3a0); -static_assert(offsetof(GridEntity_Door, _openAnimation) == 0x3a4); -static_assert(offsetof(GridEntity_Door, _closeAnimation) == 0x3bc); -static_assert(offsetof(GridEntity_Door, _lockedAnimation) == 0x3d4); -static_assert(offsetof(GridEntity_Door, _openLockedAnimation) == 0x3ec); -static_assert(sizeof(GridEntity_Door) == 0x404); - -struct GridEntity_Fire { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; - uint8_t _pad_0x154[0x23c]; -}; -static_assert(offsetof(GridEntity_Fire, _desc) == 0x4); -static_assert(offsetof(GridEntity_Fire, _varData) == 0x18); -static_assert(offsetof(GridEntity_Fire, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Fire, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Fire, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Fire, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Fire, _sprite) == 0x40); -static_assert(sizeof(GridEntity_Fire) == 0x390); - -struct GridEntity_Gravity { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; -}; -static_assert(offsetof(GridEntity_Gravity, _desc) == 0x4); -static_assert(offsetof(GridEntity_Gravity, _varData) == 0x18); -static_assert(offsetof(GridEntity_Gravity, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Gravity, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Gravity, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Gravity, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Gravity, _sprite) == 0x40); -static_assert(sizeof(GridEntity_Gravity) == 0x154); - -struct GridEntity_Lock { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; - uint8_t _pad_0x154[0x4]; -}; -static_assert(offsetof(GridEntity_Lock, _desc) == 0x4); -static_assert(offsetof(GridEntity_Lock, _varData) == 0x18); -static_assert(offsetof(GridEntity_Lock, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Lock, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Lock, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Lock, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Lock, _sprite) == 0x40); -static_assert(sizeof(GridEntity_Lock) == 0x158); - -struct GridEntity_Pit { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; - bool _hasLadder; // Lua GridEntityPit.HasLadder via binder 0088ca80: getter 008c13d0 pushboolean(byte), setter toboolean -> bool - uint8_t _pad_0x155[0x3]; -}; -static_assert(offsetof(GridEntity_Pit, _desc) == 0x4); -static_assert(offsetof(GridEntity_Pit, _varData) == 0x18); -static_assert(offsetof(GridEntity_Pit, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Pit, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Pit, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Pit, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Pit, _sprite) == 0x40); -static_assert(offsetof(GridEntity_Pit, _hasLadder) == 0x154); -static_assert(sizeof(GridEntity_Pit) == 0x158); - -struct GridEntity_Poop { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; - int _reviveTimer; // Lua GridEntityPoop.ReviveTimer via binder 0088c4c0: getter 008c10c0 FUN_0085bfd0 signed dword, setter dword - uint8_t _stateAnimation[0x18]; // std_string; Lua GridEntityPoop.StateAnimation via binder 0088c640: getter 008c1180 pushlstring of std::string, setter assign - bool _isUnderPlayer; // Lua GridEntityPoop.UnderPlayer via binder 0088c7c0: getter 008c1300 pushboolean(byte), setter toboolean -> bool - uint8_t _pad_0x171[0x2b]; -}; -static_assert(offsetof(GridEntity_Poop, _desc) == 0x4); -static_assert(offsetof(GridEntity_Poop, _varData) == 0x18); -static_assert(offsetof(GridEntity_Poop, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Poop, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Poop, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Poop, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Poop, _sprite) == 0x40); -static_assert(offsetof(GridEntity_Poop, _reviveTimer) == 0x154); -static_assert(offsetof(GridEntity_Poop, _stateAnimation) == 0x158); -static_assert(offsetof(GridEntity_Poop, _isUnderPlayer) == 0x170); -static_assert(sizeof(GridEntity_Poop) == 0x19c); - -struct GridEntity_PressurePlate { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; - ANM2 _timerPlate; // Lua GridEntityPressurePlate.TimerPlate via binder 0088d350: getter 008c17a0 UserdataValue copy-constructs ANM2, setter ANM2 copy+SwapANM2 - uint32_t _nextGreedAnimation; // char* // Lua GridEntityPressurePlate.NextGreedAnimation via binder 0088d4d0: getter 008c1940 lua_pushstring(ptr) or nil, setter stores luaL_checklstring pointer - RNG _greedModeRNG; // Lua GridEntityPressurePlate.GreedModeRNG via binder 0088d650: getter 008c1a50 UserdataValue 16-byte copy -}; -static_assert(offsetof(GridEntity_PressurePlate, _desc) == 0x4); -static_assert(offsetof(GridEntity_PressurePlate, _varData) == 0x18); -static_assert(offsetof(GridEntity_PressurePlate, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_PressurePlate, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_PressurePlate, _rng) == 0x2c); -static_assert(offsetof(GridEntity_PressurePlate, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_PressurePlate, _sprite) == 0x40); -static_assert(offsetof(GridEntity_PressurePlate, _timerPlate) == 0x154); -static_assert(offsetof(GridEntity_PressurePlate, _nextGreedAnimation) == 0x268); -static_assert(offsetof(GridEntity_PressurePlate, _greedModeRNG) == 0x26c); -static_assert(sizeof(GridEntity_PressurePlate) == 0x27c); - -struct GridEntity_Rock { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; - uint8_t _anim[0x18]; // std_string; Lua GridEntityRock.Anim via binder 0088ce40: getter 008c14a0 pushlstring of std::string, setter assign - uint8_t _rubbleAnim[0x18]; // std_string; Lua GridEntityRock.RubbleAnim via binder 0088ce40: getter 008c14a0 pushlstring of std::string, setter assign - uint8_t _rubbleOffsets[0xc]; // vector_Vector; BeginBatches 00719f80 pushes random (8-r16, 8-r16) Vectors into this std::vector (begin 184/end 188/cap 18c); Render 00719ad0 draws _rubbleAnim once per entry - int _frameCnt; // Lua GridEntityRock.FrameCnt via binder 0088cfb0: getter 008c1620 FUN_0085bfd0 signed dword, setter dword - uint8_t _pad_0x194[0x4]; -}; -static_assert(offsetof(GridEntity_Rock, _desc) == 0x4); -static_assert(offsetof(GridEntity_Rock, _varData) == 0x18); -static_assert(offsetof(GridEntity_Rock, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Rock, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Rock, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Rock, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Rock, _sprite) == 0x40); -static_assert(offsetof(GridEntity_Rock, _anim) == 0x154); -static_assert(offsetof(GridEntity_Rock, _rubbleAnim) == 0x16c); -static_assert(offsetof(GridEntity_Rock, _rubbleOffsets) == 0x184); -static_assert(offsetof(GridEntity_Rock, _frameCnt) == 0x190); -static_assert(sizeof(GridEntity_Rock) == 0x198); - -struct GridEntity_Spikes { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; - int _timeout; // Lua GridEntitySpikes.Timeout via binder 0088d7f0: getter 008c1b70 FUN_0085bfd0 signed dword, setter dword -}; -static_assert(offsetof(GridEntity_Spikes, _desc) == 0x4); -static_assert(offsetof(GridEntity_Spikes, _varData) == 0x18); -static_assert(offsetof(GridEntity_Spikes, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Spikes, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Spikes, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Spikes, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Spikes, _sprite) == 0x40); -static_assert(offsetof(GridEntity_Spikes, _timeout) == 0x154); -static_assert(sizeof(GridEntity_Spikes) == 0x158); - -struct GridEntity_Stairs { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; -}; -static_assert(offsetof(GridEntity_Stairs, _desc) == 0x4); -static_assert(offsetof(GridEntity_Stairs, _varData) == 0x18); -static_assert(offsetof(GridEntity_Stairs, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Stairs, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Stairs, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Stairs, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Stairs, _sprite) == 0x40); -static_assert(sizeof(GridEntity_Stairs) == 0x154); - -struct GridEntity_Statue { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; - uint8_t _pad_0x154[0x4]; -}; -static_assert(offsetof(GridEntity_Statue, _desc) == 0x4); -static_assert(offsetof(GridEntity_Statue, _varData) == 0x18); -static_assert(offsetof(GridEntity_Statue, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Statue, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Statue, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Statue, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Statue, _sprite) == 0x40); -static_assert(sizeof(GridEntity_Statue) == 0x158); - -struct GridEntity_TNT { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; - int _frameCnt; // Lua GridEntityTNT.FrameCnt via binder 0088d150: getter 008c16e0 FUN_0085bfd0 signed dword, setter dword -}; -static_assert(offsetof(GridEntity_TNT, _desc) == 0x4); -static_assert(offsetof(GridEntity_TNT, _varData) == 0x18); -static_assert(offsetof(GridEntity_TNT, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_TNT, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_TNT, _rng) == 0x2c); -static_assert(offsetof(GridEntity_TNT, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_TNT, _sprite) == 0x40); -static_assert(offsetof(GridEntity_TNT, _frameCnt) == 0x154); -static_assert(sizeof(GridEntity_TNT) == 0x158); - -struct GridEntity_Teleporter { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; -}; -static_assert(offsetof(GridEntity_Teleporter, _desc) == 0x4); -static_assert(offsetof(GridEntity_Teleporter, _varData) == 0x18); -static_assert(offsetof(GridEntity_Teleporter, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Teleporter, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Teleporter, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Teleporter, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Teleporter, _sprite) == 0x40); -static_assert(sizeof(GridEntity_Teleporter) == 0x154); - -struct GridEntity_TrapDoor { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; - uint8_t _pad_0x154[0x4]; -}; -static_assert(offsetof(GridEntity_TrapDoor, _desc) == 0x4); -static_assert(offsetof(GridEntity_TrapDoor, _varData) == 0x18); -static_assert(offsetof(GridEntity_TrapDoor, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_TrapDoor, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_TrapDoor, _rng) == 0x2c); -static_assert(offsetof(GridEntity_TrapDoor, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_TrapDoor, _sprite) == 0x40); -static_assert(sizeof(GridEntity_TrapDoor) == 0x158); - -struct GridEntity_Wall { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; -}; -static_assert(offsetof(GridEntity_Wall, _desc) == 0x4); -static_assert(offsetof(GridEntity_Wall, _varData) == 0x18); -static_assert(offsetof(GridEntity_Wall, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Wall, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Wall, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Wall, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Wall, _sprite) == 0x40); -static_assert(sizeof(GridEntity_Wall) == 0x154); - -struct GridEntity_Web { // : GridEntity (flattened) - uint8_t _pad_0x0[0x4]; - uint8_t _desc[0x14]; // GridEntityDesc - int _varData; - uint8_t _pad_0x1c[0x8]; - uint32_t _gridIndex; - uint32_t _spawnFrame; // GridEntity::Init (00709db0) sets this+0x28 = Game _frameCount (Game+0x264f8); GridEntity_TrapDoor::Update compares it with the room's entry frame - RNG _rng; - int _collisionClass; - ANM2 _sprite; -}; -static_assert(offsetof(GridEntity_Web, _desc) == 0x4); -static_assert(offsetof(GridEntity_Web, _varData) == 0x18); -static_assert(offsetof(GridEntity_Web, _gridIndex) == 0x24); -static_assert(offsetof(GridEntity_Web, _spawnFrame) == 0x28); -static_assert(offsetof(GridEntity_Web, _rng) == 0x2c); -static_assert(offsetof(GridEntity_Web, _collisionClass) == 0x3c); -static_assert(offsetof(GridEntity_Web, _sprite) == 0x40); -static_assert(sizeof(GridEntity_Web) == 0x154); - -struct InfoDisplay { - uint8_t _collectibles[0x8]; // std_map_int_InfoDisplayEntry; PauseScreen::update_items_page 008d3890 looks a collectible id up in the map at Manager+0x2a530 (value at node+0x14), else the default entry +0x20 - uint8_t _trinkets[0x8]; // std_map_int_InfoDisplayEntry; PauseScreen::update_items_page 008d3890 and FUN_008d4040 look up id&0xffff7fff (trinket, golden bit stripped) in the map at Manager+0x2a538, else the default entry Manager+0x2a550 - uint8_t _pad_0x10[0x10]; - uint8_t _defaultEntry[0x4]; // InfoDisplayEntry; ? ctor 00950610 runs InfoDisplayEntry::InfoDisplayEntry on Manager+0x2a550 (0x114 bytes, = map node value size 0x128-0x14); update_items_page 008d3890 falls back to it when an id has no entry -}; -static_assert(offsetof(InfoDisplay, _collectibles) == 0x0); -static_assert(offsetof(InfoDisplay, _trinkets) == 0x8); -static_assert(offsetof(InfoDisplay, _defaultEntry) == 0x20); - -struct ItemConfig { - uint8_t _collectibles[0xc]; // vector_ItemConfigItemPtr; ItemConfig::GetCollectible 0072fd10 bounds (this[1]-this[0])>>2 and returns *(begin+id*4); FUN_007252a0 (called by ItemConfig::destructor 00725190) deletes each 0xe8-byte ItemConfig_Item; Manager+0x2a408 = end (153 uses) - uint8_t _trinkets[0xc]; // vector_ItemConfigItemPtr; ItemConfig::GetTrinket 0072fd70 indexes this[3]/this[4] with id&0x7fff; Manager+0x2a410/0x2a414 (PlayerManager::AnyoneHasTrinket); FUN_007252a0 deletes 0xe8-byte items - uint8_t _nullItems[0xc]; // vector_ItemConfigItemPtr; Lua Config:GetNullItem 0072fda0 indexes +0x18/+0x1c; Manager+0x2a41c/0x2a420: Entity_Player::reroll_collectibles_on_damage 005c88a0 AddCostume(nullItems[playerForm+0x28]) - uint8_t _cards[0xc]; // vector_ItemConfigCardPtr; ItemConfig::GetCard 0072fe00 indexes this[9]/this[10]; FUN_007252a0 deletes 0x70-byte ItemConfig_Card (3 strings); Manager+0x2a428/0x2a42c (Entity_Effect::setup_loot_preview) - uint8_t _pillEffects[0xc]; // vector_ItemConfigPillPtr; Lua Config:GetPillEffect 0072fdd0 indexes +0x30/+0x34; FUN_007252a0 deletes 0x54-byte ItemConfig_Pill; Manager+0x2a434/0x2a438 (Console::FillOmnicomplete) - uint8_t _collectibleNameMap[0x8]; // std_map_string_int; LuaEngine::Isaac_GetItemIdByName 0086f640 looks up Manager+0x2a440 = ItemConfig(Manager+0x2a404, Isaac::GetItemConfig 0042ca00)+0x3c, string key, int value at node+0x28; ItemConfig::Load 00725570 clears this+0x3c - uint8_t _playerForms[0xc]; // vector_ItemConfigPlayerFormPtr; Entity_Player::reroll_collectibles_on_damage 005c88a0 loops ids <0x10 over Manager+0x2a448/0x2a44c (= ItemConfig+0x44), calls IncrementPlayerFormCounter(id,-1) and AddCostume(null item at form+0x28); FUN_007252a0 deletes 0x30-byte entries (1 string) - uint8_t _wispGfxRoot[0x18]; // std_string; ? std::string at Manager+0x2a454 (= ItemConfig+0x50) is the prefix copied before "hungry_%d.png" (Entity_Familiar::load_config_graphics 0064a830) and anm2= overrides (anm2_apply_gfx_overrides 0064aab0); load_wisps_xml 0072a1b0 reads the root "gfxroot" attribute; destructor 00725190 frees a string here - uint8_t _pad_0x68[0x14]; - uint8_t _locustConfigs[0x8]; // std_map_LocustConfig; ItemConfig::LoadLocustConfig 0072ba80 clears the tree at +0x7c (size +0x80) before parsing locusts.xml (color/scale/quality per item) and inserts entries (FUN_00731870); ItemConfig::destructor 00725190 erases it and deletes the 0x54-byte head - uint8_t _pad_0x84[0x80]; - uint8_t _availabilityFilters[0xc]; // vector_ItemAvailabilityFn; Item::IsAvailable 007300d0 (flag 8) calls every function pointer in Manager+0x2a508..0x2a50c (= ItemConfig+0x104) and rejects on false; ItemPool::GetCardImpl 007376c0 and Entity_Player::ModelingClay_roll 007dbd70 push a filter, roll, then pop it; destructor 00725190 Tidy(+0x104) -}; -static_assert(offsetof(ItemConfig, _collectibles) == 0x0); -static_assert(offsetof(ItemConfig, _trinkets) == 0xc); -static_assert(offsetof(ItemConfig, _nullItems) == 0x18); -static_assert(offsetof(ItemConfig, _cards) == 0x24); -static_assert(offsetof(ItemConfig, _pillEffects) == 0x30); -static_assert(offsetof(ItemConfig, _collectibleNameMap) == 0x3c); -static_assert(offsetof(ItemConfig, _playerForms) == 0x44); -static_assert(offsetof(ItemConfig, _wispGfxRoot) == 0x50); -static_assert(offsetof(ItemConfig, _locustConfigs) == 0x7c); -static_assert(offsetof(ItemConfig, _availabilityFilters) == 0x104); - -struct ItemConfig_Card { - int id; - int achievementId; - uint8_t name[0x18]; // std_string - uint8_t desc[0x18]; // std_string; Lua Card.Description field+0x20 - uint8_t hudAnim[0x18]; // std_string - bool greedModeAllowed; - uint8_t _pad_0x51[0x3]; - uint32_t pickupSubtype; - uint32_t cardType; - uint32_t announcerVoice; - uint32_t announcerDelay; - uint32_t mimicCharge; - uint32_t modEntry; // ModEntry* // 0072cff0 ItemConfig::load_pocketitems_xml: new(0x70) card, [card+0x68]=ModEntry* param (0072e174); null -> vanilla card table, else appended to modded list - uint32_t moddedCardFront; // ANM2* // 0072cff0 load_pocketitems_xml: card+0x6c=0 in ctor, then =&ModEntry+0x9a0 (0072e1af) when the mod has a card-front sprite (ModEntry+0xaa9) -}; -static_assert(offsetof(ItemConfig_Card, id) == 0x0); -static_assert(offsetof(ItemConfig_Card, achievementId) == 0x4); -static_assert(offsetof(ItemConfig_Card, name) == 0x8); -static_assert(offsetof(ItemConfig_Card, desc) == 0x20); -static_assert(offsetof(ItemConfig_Card, hudAnim) == 0x38); -static_assert(offsetof(ItemConfig_Card, greedModeAllowed) == 0x50); -static_assert(offsetof(ItemConfig_Card, pickupSubtype) == 0x54); -static_assert(offsetof(ItemConfig_Card, cardType) == 0x58); -static_assert(offsetof(ItemConfig_Card, announcerVoice) == 0x5c); -static_assert(offsetof(ItemConfig_Card, announcerDelay) == 0x60); -static_assert(offsetof(ItemConfig_Card, mimicCharge) == 0x64); -static_assert(offsetof(ItemConfig_Card, modEntry) == 0x68); -static_assert(offsetof(ItemConfig_Card, moddedCardFront) == 0x6c); - -struct ItemConfig_Costume { - uint32_t id; - uint8_t anm2Path[0x18]; // std_string - uint32_t priority; - bool hasOverlay; - bool isFlying; - bool hasSkinAlt; - uint8_t _pad_0x23[0x1]; - int skinColor; - bool overwriteColor; - uint8_t _pad_0x29[0x3]; -}; -static_assert(offsetof(ItemConfig_Costume, id) == 0x0); -static_assert(offsetof(ItemConfig_Costume, anm2Path) == 0x4); -static_assert(offsetof(ItemConfig_Costume, priority) == 0x1c); -static_assert(offsetof(ItemConfig_Costume, hasOverlay) == 0x20); -static_assert(offsetof(ItemConfig_Costume, isFlying) == 0x21); -static_assert(offsetof(ItemConfig_Costume, hasSkinAlt) == 0x22); -static_assert(offsetof(ItemConfig_Costume, skinColor) == 0x24); -static_assert(offsetof(ItemConfig_Costume, overwriteColor) == 0x28); - -struct ItemConfig_Item { - int type; - int id; - uint8_t name[0x18]; // std_string - uint8_t desc[0x18]; // std_string; Lua Item.Description field+0x20 - uint8_t gfxFilename[0x18]; // std_string - int achievementId; - int cacheFlags; - int addMaxhearts; - int addHearts; - int addSoulHearts; - int addBlackHearts; - int addBombs; - int addKeys; - int addCoins; - uint32_t maxCharges; - uint32_t maxCooldown; - short devilprice; - short shopPrice; - ItemConfig_Costume costume; - uint32_t chargeType; - bool special; - bool passiveCache; - bool addCostumeOnPickup; - bool hidden; - bool persistentEffect; - bool clearEffectsOnRemove; - uint8_t _pad_0xb6[0x2]; - uint64_t tags; - int quality; - int craftingQuality; - int _initCharge; // Lua Item.InitCharge via binder 00878d70: getter 008bccf0 FUN_0085bfd0 signed dword (same binder as MaxCharges) -}; -static_assert(offsetof(ItemConfig_Item, type) == 0x0); -static_assert(offsetof(ItemConfig_Item, id) == 0x4); -static_assert(offsetof(ItemConfig_Item, name) == 0x8); -static_assert(offsetof(ItemConfig_Item, desc) == 0x20); -static_assert(offsetof(ItemConfig_Item, gfxFilename) == 0x38); -static_assert(offsetof(ItemConfig_Item, achievementId) == 0x50); -static_assert(offsetof(ItemConfig_Item, cacheFlags) == 0x54); -static_assert(offsetof(ItemConfig_Item, addMaxhearts) == 0x58); -static_assert(offsetof(ItemConfig_Item, addHearts) == 0x5c); -static_assert(offsetof(ItemConfig_Item, addSoulHearts) == 0x60); -static_assert(offsetof(ItemConfig_Item, addBlackHearts) == 0x64); -static_assert(offsetof(ItemConfig_Item, addBombs) == 0x68); -static_assert(offsetof(ItemConfig_Item, addKeys) == 0x6c); -static_assert(offsetof(ItemConfig_Item, addCoins) == 0x70); -static_assert(offsetof(ItemConfig_Item, maxCharges) == 0x74); -static_assert(offsetof(ItemConfig_Item, maxCooldown) == 0x78); -static_assert(offsetof(ItemConfig_Item, devilprice) == 0x7c); -static_assert(offsetof(ItemConfig_Item, shopPrice) == 0x7e); -static_assert(offsetof(ItemConfig_Item, costume) == 0x80); -static_assert(offsetof(ItemConfig_Item, chargeType) == 0xac); -static_assert(offsetof(ItemConfig_Item, special) == 0xb0); -static_assert(offsetof(ItemConfig_Item, passiveCache) == 0xb1); -static_assert(offsetof(ItemConfig_Item, addCostumeOnPickup) == 0xb2); -static_assert(offsetof(ItemConfig_Item, hidden) == 0xb3); -static_assert(offsetof(ItemConfig_Item, persistentEffect) == 0xb4); -static_assert(offsetof(ItemConfig_Item, clearEffectsOnRemove) == 0xb5); -static_assert(offsetof(ItemConfig_Item, tags) == 0xb8); -static_assert(offsetof(ItemConfig_Item, quality) == 0xc0); -static_assert(offsetof(ItemConfig_Item, craftingQuality) == 0xc4); -static_assert(offsetof(ItemConfig_Item, _initCharge) == 0xc8); - -struct ItemConfig_Pill { - int id; - int achievementId; - uint8_t name[0x18]; // std_string - uint8_t desc[0x18]; // std_string; ItemConfig::load_pocketitems_xml (0072cff0) parses the "description" attribute into a local std::string (72d42d, [ebp-0x58]) and std::string::assign's it to pill entry +0x20 (name at +0x8, Lua GreedModeAllowed at +0x38) - bool greedModeAllowed; - uint8_t _pad_0x39[0x3]; - uint32_t announcerVoice; - uint32_t announcerVoiceSuper; - uint32_t announcerVoiceDelay; // Lua PillEffect.AnnouncerDelay field+0x44 - uint32_t mimicCharge; - uint8_t effectClass; - uint8_t effectSubClass; - uint8_t _pad_0x4e[0x2]; -}; -static_assert(offsetof(ItemConfig_Pill, id) == 0x0); -static_assert(offsetof(ItemConfig_Pill, achievementId) == 0x4); -static_assert(offsetof(ItemConfig_Pill, name) == 0x8); -static_assert(offsetof(ItemConfig_Pill, desc) == 0x20); -static_assert(offsetof(ItemConfig_Pill, greedModeAllowed) == 0x38); -static_assert(offsetof(ItemConfig_Pill, announcerVoice) == 0x3c); -static_assert(offsetof(ItemConfig_Pill, announcerVoiceSuper) == 0x40); -static_assert(offsetof(ItemConfig_Pill, announcerVoiceDelay) == 0x44); -static_assert(offsetof(ItemConfig_Pill, mimicCharge) == 0x48); -static_assert(offsetof(ItemConfig_Pill, effectClass) == 0x4c); -static_assert(offsetof(ItemConfig_Pill, effectSubClass) == 0x4d); - -struct LayerState { - uint32_t _layerData; // LayerData* // LayerState::Init 00408310 stores its LayerInfo* arg at *this and copies the spritesheet path from arg+0x20; ANM2::Load 0040bd50 reads the layer name at *(layer)+8 to find "shadow" / "*" layers; AnmCache::Load 0040db90 calls Init(layerData + i*0x38) per layer - uint32_t _animation; // ANM2* // AnmCache::Load 0040db90: after LayerState::Init, layerState[i]+4 = the ANM2 (whose +0x7c is the layer-state array) - uint8_t _spriteSheetPath[0x18]; // std_string; Sprite::ReplaceSpritesheet 0040bf30 compares/assigns the path at layer+8 (stride 0xa0) and clears +0x30; ANM2::LoadGraphics 0040c000 passes layer+8 to Manager::LoadImage - uint32_t _minFilterMode; // LayerState::GetTexture 00408590 passes +0x20/+0x24 to texture vtbl+0x44 (filter) when they differ from tex+0x30/+0x34; SetTexture 00408640 copies tex+0x30 into +0x20; show_beta_disclaimer_popup 00420190 sets GetLayer(0)+0x20 = +0x24 = 1 on its popup sprite - uint32_t _magFilterMode; // LayerState::GetTexture 00408590 second arg of texture vtbl+0x44 (filter) with +0x20; SetTexture 00408640 copies tex+0x34 - uint32_t _wrapSMode; // LayerState::GetTexture 00408590 passes +0x28/+0x2c to texture vtbl+0x48 (wrap) when they differ from tex+0x38/+0x3c; SetTexture 00408640 copies tex+0x38; shader renders set GetLayer(0)+0x28 = +0x2c = 0 - uint32_t _wrapTMode; // LayerState::GetTexture 00408590 second arg of texture vtbl+0x48 (wrap); SetTexture 00408640 copies tex+0x3c - bool _spriteSheetLoaded; // ANM2::LoadGraphics 0040c000 skips a layer whose +0x30 is set, else loads the image and stores the success flag there; Sprite::ReplaceSpritesheet 0040bf30 clears it; Entity_Pickup::load_collectible_gfx 006e1e90 sets it after binding the glitched-item render target - uint8_t _pad_0x31[0x1]; - bool _flipX; // render_build_sprite_quad 00409cb0 (param_4 = the LayerState from AnimationLayer::RenderFrame 00409120) negates the x scale when layer+0x32 != 0 - bool _flipY; // render_build_sprite_quad 00409cb0 negates the y scale when layer+0x33 != 0 - Vector _size; // render_build_sprite_quad 00409cb0 multiplies frame scale (+0x18/+0x1c) by layer+0x34/+0x38; LayerState::Init 00408310 sets it to g_vectorOne - float _rotation; // render_build_sprite_quad 00409cb0 adds layer+0x3c to the frame rotation (+0x5c); LayerState::Init 00408310 = 0 - Vector _pos; // render_build_sprite_quad 00409cb0 adds layer+0x40/+0x44 to the frame position (+0x10/+0x14); LayerState::Init 00408310 sets it to g_vectorZero - ColorMod _color; // AnimationLayer::RenderFrame 00409120 Color::operator_assign(layer+0x48) when flag 1 is set; LayerState::Init 00408310 = tint 1,1,1,1, colorize/offset 0 (0x48..0x73) - bool _visible; // AnimationLayer::RenderFrame 00409120 returns when byte [layer+0x74] == 0 (CMP byte ptr [EDI+0x74],0 at 004091b8); LayerState::Init 00408310 sets it to 1; Menu_Online::Render 008e4e30 sets GetLayer("BackKey")->+0x74 by controller type - uint8_t _pad_0x75[0x3]; - int _blendMode[5]; // AnimationLayer::RenderFrame 00409120 loads +0x78..+0x84 into g_graphicsManager_blendMode[0..3] and +0x88 into DAT_00c79910; ctor 004081d0/Init 00408310 set 0, 1|6, 7, 1, 7 - uint32_t _bitflags; // AnimationLayer::RenderFrame 00409120 ORs layer+0x8c with ANM2+0x110 flags (OR ECX,[EDI+0x8c] at 004091f1); render_build_sprite_quad 00409cb0 tests flag 8 in the same OR; ANM2::Load 0040bd50 sets |= 5 on "*" layers - Vector _cropOffset; // AnimationLayer::RenderFrame 00409120 adds layer+0x90/+0x94 to the source quad position; Entity_Pickup::load_collectible_gfx 006e1e90 sets it to the glitched-item atlas cell (~id&0x1f)*32, (~id>>5)*32; Init 00408310 = g_vectorZero - uint8_t _spriteSheet[0x4]; // KAGE_SmartPointer_ImageBase; LayerState::GetTexture 00408590 reads the image at *(layer+0x98) (filter/wrap via its vtbl) and returns a SmartPointer copy of +0x98; ctor 004081d0 zeroes +0x98/+0x9c (8-byte smart pointer, struct stride 0xa0) -}; -static_assert(offsetof(LayerState, _layerData) == 0x0); -static_assert(offsetof(LayerState, _animation) == 0x4); -static_assert(offsetof(LayerState, _spriteSheetPath) == 0x8); -static_assert(offsetof(LayerState, _minFilterMode) == 0x20); -static_assert(offsetof(LayerState, _magFilterMode) == 0x24); -static_assert(offsetof(LayerState, _wrapSMode) == 0x28); -static_assert(offsetof(LayerState, _wrapTMode) == 0x2c); -static_assert(offsetof(LayerState, _spriteSheetLoaded) == 0x30); -static_assert(offsetof(LayerState, _flipX) == 0x32); -static_assert(offsetof(LayerState, _flipY) == 0x33); -static_assert(offsetof(LayerState, _size) == 0x34); -static_assert(offsetof(LayerState, _rotation) == 0x3c); -static_assert(offsetof(LayerState, _pos) == 0x40); -static_assert(offsetof(LayerState, _color) == 0x48); -static_assert(offsetof(LayerState, _visible) == 0x74); -static_assert(offsetof(LayerState, _blendMode) == 0x78); -static_assert(offsetof(LayerState, _bitflags) == 0x8c); -static_assert(offsetof(LayerState, _cropOffset) == 0x90); -static_assert(offsetof(LayerState, _spriteSheet) == 0x98); - -struct Level { - uint32_t _stage; // Level:GetStage binding (0040c3a0) returns *this - uint32_t _stageType; // Level:GetStageType (004073c0) returns this+4; Level::IsAltStage (0042a2c0) - uint8_t _pad_0x8[0x4]; - uint32_t _curses; // Level::generate_dungeon 00740e10 ORs this+0xc with Game+0x26550 and Seeds::GetForcedCurses (Game._curses at the same offset; Level*==Game*) - bool _isHeartPicked; - bool _isCanSeeEverything; - uint8_t _pad_0x12[0x2]; - RoomDescriptor _roomList[527]; // Level::GetRoomByIdx 00740bc0 returns this+0x14+n*0xb8 for n = roomMap[...] < 0x20f; QueryRoomTypeIndex 007484c0 reads ->Data (+0x10 = 0x24), +0xc (0x20), +0xb4 (0xc8) per 0xb8 stride - int _roomMap[507]; // Level::GetRoomByIdx 00740bc0 reads this+0x17adc+(dimension*0xa9+idx)*4 as the _roomList index (3 dimensions x 169) - uint32_t _currentRoomMap; // int* // Level::ChangeRoom 0073fc80 / Init 00744940 set it to &_roomMap[dimension*0xa9] (this+0x17adc+dim*0x2a4) - int _roomCount; - int _startingRoomIndex; - RNG _generationRNG; // Level::generate_dungeon 00740e10 / Init 00744940 seed+step the RNG at 0x182d4..0x182e0 (Game._generationRNG) - RNG _devilAngelRoomRNG; // Level:GetDevilAngelRoomRNG (007537f0) returns this+0x182e4 (not in REPENTOGON) - float _angelRoomChance; // Level::GetAngelRoomChance (007e9270)/AddAngelRoomChance (0065cf00) (not in REPENTOGON) - uint8_t _pad_0x182f8[0x8]; - uint32_t _room; // Room* // Level::ChangeRoom 0073fc80 / RestoreGameState 007475b0 use it as the current Room (Game._room, Level::GetCurrentRoom 00407480) - int _currentRoomIndex; - int _previousRoomIndex; - int _currentDimensionIdx; // Level::GetRoomByIdx 00740bc0 uses it as default dimension; ChangeRoom 0073fc80 sets it with _currentRoomMap (Game._currentDimensionIdx) - int _lastRoomDimensionIdx; // Level::ChangeRoom 0073fc80 / Init 00744940 write it (Game._lastRoomDimensionIdx) - int _lastBossRoomListIndex; - int _leaveDoor; - int _enterDoor; - Vector _dungeonReturnPosition; // Lua Level:DungeonReturnPosition 0085e140 returns this+0x18320/+0x18324; Level::GetEnterPosition 0074a090 returns it for the crawlspace return room; Level::RestoreGameState 007475b0 restores it - int _dungeonReturnRoomIndex; - int _dungeonPlacementSeed; - uint8_t _pad_0x18330[0x4]; - int _greedModeWave; - uint8_t _pad_0x18338[0x3c]; - uint32_t _greedwavesclearedwithoutredheartdamage; // Room::SpawnGreedModeWave (00816910) increments; Level::SetRedHeartDamage (0074b5b0) zeroes (REPENTOGON said 0x18204, +0x170) - uint8_t _ventricleRazorPortals[24]; // 2 x {int roomIdx, int gridIdx, bool}: FUN_0074a280 ("PortalIdx is bigger than 2!") stores _currentRoomIndex/arg/flag at this+0x18378+i*0xc, called from UseActiveItem case 0x18c (Ventricle Razor); Init 00744940 / ChangeRoom (Beast room) reset roomIdx to -99999 - uint8_t _pad_0x18390[0xc]; - uint32_t _levelStateFlag; // Level::GetStateFlag (004f88f0)/SetStateFlag (00428a80) bitset at this+0x1839c (REPENTOGON Level said 0x1822c, +0x170) -}; -static_assert(offsetof(Level, _stage) == 0x0); -static_assert(offsetof(Level, _stageType) == 0x4); -static_assert(offsetof(Level, _curses) == 0xc); -static_assert(offsetof(Level, _isHeartPicked) == 0x10); -static_assert(offsetof(Level, _isCanSeeEverything) == 0x11); -static_assert(offsetof(Level, _roomList) == 0x14); -static_assert(offsetof(Level, _roomMap) == 0x17adc); -static_assert(offsetof(Level, _currentRoomMap) == 0x182c8); -static_assert(offsetof(Level, _roomCount) == 0x182cc); -static_assert(offsetof(Level, _startingRoomIndex) == 0x182d0); -static_assert(offsetof(Level, _generationRNG) == 0x182d4); -static_assert(offsetof(Level, _devilAngelRoomRNG) == 0x182e4); -static_assert(offsetof(Level, _angelRoomChance) == 0x182f4); -static_assert(offsetof(Level, _room) == 0x18300); -static_assert(offsetof(Level, _currentRoomIndex) == 0x18304); -static_assert(offsetof(Level, _previousRoomIndex) == 0x18308); -static_assert(offsetof(Level, _currentDimensionIdx) == 0x1830c); -static_assert(offsetof(Level, _lastRoomDimensionIdx) == 0x18310); -static_assert(offsetof(Level, _lastBossRoomListIndex) == 0x18314); -static_assert(offsetof(Level, _leaveDoor) == 0x18318); -static_assert(offsetof(Level, _enterDoor) == 0x1831c); -static_assert(offsetof(Level, _dungeonReturnPosition) == 0x18320); -static_assert(offsetof(Level, _dungeonReturnRoomIndex) == 0x18328); -static_assert(offsetof(Level, _dungeonPlacementSeed) == 0x1832c); -static_assert(offsetof(Level, _greedModeWave) == 0x18334); -static_assert(offsetof(Level, _greedwavesclearedwithoutredheartdamage) == 0x18374); -static_assert(offsetof(Level, _ventricleRazorPortals) == 0x18378); -static_assert(offsetof(Level, _levelStateFlag) == 0x1839c); - -struct LobbySettings { - uint8_t _pad_0x0[0x4]; - int _gameMode; // ? Menu_Online::update_mode_select 008ccc70 cycles Manager+0x4b0dc (= +0x4) through 0..4 (left/right); FUN_008cc530 / FUN_008eba50 test 4/5; Menu_Challenge::Update zeroes it; reset zeroes it - int _challenge; // ? Menu_OnlineLobby::Render 008e8af0 draws the "ChallengeName" layer frame from Manager+0x4b0e0 (= +0x8) - 1; Menu_Challenge::Update/reset test it with challenge 0x15; reset zeroes it - int _maxPlayers; // LobbySettings::reset 0085b050 sets +0xc = 4; Menu_Online::update_mode_select 008ccc70 cycles Manager+0x4b0e4 (= +0xc) within 2..4 - uint8_t _pad_0x10[0x8]; - uint8_t _seed[0x18]; // std_string; ? Menu_Challenge::render_seed_text 008cd7b0 copies Manager+0x4b0f0 (= +0x18) for the "SeedPos" text; update_mode_select 008ccc70 clears it (size +0x28); reset clears it - uint8_t _password[0x18]; // std_string; FUN_008de690 (strs "lobby_password") edits Manager+0x4b108 (= +0x30) while its size (+0x40, Manager+0x4b118) < 8; Menu_OnlineLobby::Render 008e8af0 shows "Show_Password" when the size is non-zero; PauseScreen::Update and netplay_lobby_menu_update test the size -}; -static_assert(offsetof(LobbySettings, _gameMode) == 0x4); -static_assert(offsetof(LobbySettings, _challenge) == 0x8); -static_assert(offsetof(LobbySettings, _maxPlayers) == 0xc); -static_assert(offsetof(LobbySettings, _seed) == 0x18); -static_assert(offsetof(LobbySettings, _password) == 0x30); - -struct PersistentGameData { - uint8_t _pad_0x0[0x1]; - bool _isReadOnly; // ? TryUnlock 00929a20, IncreaseEventCounter 00929b40, AddToCollection 0092a2d0, AddChallenge 0092a7b0, AddBestiaryKill 0092acb0, TryAddBestiaryEncounter 0092aea0 and Manager+0x15 users (Room::SpawnClearAward 007fb250) all skip writing while it is set; Clear 009262b0 zeroes it - bool _isSteamAchievementsEnabled; // ? Clear 009262b0 sets 1; TryUnlock 00929a20 only calls UnlockSteamAchievement and Manager::queue_achievement_popup when set; UnlockSteamAchievement 00929790 also checks it - uint8_t _pad_0x3[0x1]; - uint32_t _saveFile; // void* // PersistentGameData::Load 00926a50 / SaveToSteamCloud 00928ee0 delete the old file object at this+4 (vtbl[0](1)) and store the new one; ctor 00925f80 zeroes it; Manager::destructor frees it - uint8_t _pad_0x8[0x30]; - bool _achievements[642]; // PersistentGameData::TryUnlock 00929a20 / Unlocked 00929aa0 read/write this+0x38+id (id<=0x281); write 009282e0 chunk 1 = 0x282 bytes from +0x38; Manager+0x4c+id users (Manager 0xe4/0xe5/0x6d/0x1e7/0x142/...) - uint8_t _pad_0x2ba[0x2]; - int _eventCounters[523]; // PersistentGameData::IncreaseEventCounter 00929b40 adds to this[0xaf+id]*4 (= +0x2bc); write 009282e0 chunk 2 = 0x20b ints; Menu_Stats::Update reads Manager+0x2d4 (counter 1) and +0x2f8; Manager 0x324/0x328 are counters 21/22 - uint8_t _pad_0xae8[0x3b8]; - int _cutsceneCounters[27]; // Manager::ShowCutscene 00958e60 increments [cutsceneID] and [2] (credits, when id!=1) and sets changes-made; BossOverlay::update 004212c0 increments Manager+0xf18 (= [25]) with cutscene 0x19; write 009282e0 chunk 8 = 0x1b ints from +0xea0 - int _lastDifficulty; // Menu_Character::handle_input 0094c580 stores Difficulty into Manager+0xf20 (= +0xf0c); Menu_Character::Reset 00948fc0 reads it back; write 009282e0 chunk 9 (2 ints at +0xf0c) - int _characterMenuShown; // Menu_Character::set_character_menu_shown 009495f0 writes Manager+0xf24 (= +0xf10, normal/tainted page); Reset 00948fc0 and LoadGraphics read it; Menu_OnlineLobby::update_controls flips 1-x; MenuManager::start_game tests ==1; 2nd int of write chunk 9 - uint8_t _pad_0xf14[0x50]; - uint8_t _bestiaryEncounters[0x8]; // std_map_int_int; PersistentGameData::TryAddBestiaryEncounter 0092aea0 inserts key (id<<12|variant)*0x100 into the map at this+0xf64 (size +0xf68); Clear 009262b0 erases it - uint8_t _bestiaryKills[0x8]; // std_map_int_int; PersistentGameData::AddBestiaryKill 0092acb0 / GetBestiaryKillCount 0092b100 use the map at this+0xf6c (size +0xf70); Clear 009262b0 erases it - uint8_t _pad_0xf74[0x8]; - uint8_t _bestiaryDeaths[0x8]; // std_map_int_int; PersistentGameData::GetBestiaryDeathCount 0092b070 finds key (id<<12|variant)*0x100 and returns node value (+0x14) unless it is the head this+0xf7c; Clear 009262b0 erases it and zeroes size +0xf80 - uint8_t _pad_0xf84[0x8]; - bool _isFileLoaded; // Clear 009262b0 sets 1; load paths FUN_0092bf00 / TryImportABLocalSave 0092c2c0 store the read result; Game::Exit 006fa0c0 and Menu_Save::Update 009d9c60 only save when changes-made && Manager+0xfa0 (= +0xf8c) - uint8_t _pad_0xf8d[0x3]; -}; -static_assert(offsetof(PersistentGameData, _isReadOnly) == 0x1); -static_assert(offsetof(PersistentGameData, _isSteamAchievementsEnabled) == 0x2); -static_assert(offsetof(PersistentGameData, _saveFile) == 0x4); -static_assert(offsetof(PersistentGameData, _achievements) == 0x38); -static_assert(offsetof(PersistentGameData, _eventCounters) == 0x2bc); -static_assert(offsetof(PersistentGameData, _cutsceneCounters) == 0xea0); -static_assert(offsetof(PersistentGameData, _lastDifficulty) == 0xf0c); -static_assert(offsetof(PersistentGameData, _characterMenuShown) == 0xf10); -static_assert(offsetof(PersistentGameData, _bestiaryEncounters) == 0xf64); -static_assert(offsetof(PersistentGameData, _bestiaryKills) == 0xf6c); -static_assert(offsetof(PersistentGameData, _bestiaryDeaths) == 0xf7c); -static_assert(offsetof(PersistentGameData, _isFileLoaded) == 0xf8c); - -struct NightmareScene { - uint8_t _pad_0x0[0x36c]; - int _stageBarIcons[14]; // ? NightmareScene::record_stage 00923320 maps (stage, stageType) to a stage-bar icon index stored at +0x36c + stage*4 (stage 13 at +0x3a0); FUN_00707ad0 sets entry 0 (Manager+0x21994) to -3 in greed / 0; Manager::unload_configs 00953f10 sets entries 0/1 to 0x11 -}; -static_assert(offsetof(NightmareScene, _stageBarIcons) == 0x36c); - -struct MusicChannel { - uint8_t _pad_0x0[0x16c]; - uint32_t _enabledLayers; // MusicManager::EnableLayer 007e2280 ORs 1<::_Tidy - uint8_t _pad_0xc[0x4]; - float _volumeModifier; // Manager::Update 00954cd0 eases Manager+0x2a334 (= SFX+0x10) toward 1.0 by _volumeModifierStep each unpaused frame and calls ClearVolumeModifier; BossOverlay::update 004212c0 resets it to 1.0; NpcAI::ENTITY_DOGMA_angel sets -10.0; ctor sets 1.0 - float _volumeModifierStep; // Manager::Update 00954cd0 uses Manager+0x2a338 (= SFX+0x14) as the per-frame step for _volumeModifier; ctor 00950610 and BossOverlay::update/FUN_00421260 set it to 0.005 -}; -static_assert(offsetof(SoundEffects, _sounds) == 0x0); -static_assert(offsetof(SoundEffects, _volumeModifier) == 0x10); -static_assert(offsetof(SoundEffects, _volumeModifierStep) == 0x14); - -struct OptionsConfig { - uint8_t _optionsIniFilePath[0x18]; // std_string; OptionsConfig::Save 00924d10 opens this std::string (cap check +0x14) as the ini path - float _musicVolume; // OptionsConfig::Save 00924d10 "MusicVolume=%.4f"; Load 00924440 stores it; Lua Options::MusicVolume 00896810 reads Manager+0x2a354 - float _sfxVolume; // Save 00924d10 "SFXVolume="; Load 00924440; Lua Options::SFXVolume 008969e0 - float _mapOpacity; // Save 00924d10 "MapOpacity="; Load 00924440; Lua Options::MapOpacity 00896a50 - bool _isFullscreen; // Save 00924d10 "Fullscreen="; Lua Options::Fullscreen 00896ab0 - bool _filterEnabled; // Save 00924d10 "Filter="; Load 00924440; Lua Options::Filter 00896c10 - uint8_t _pad_0x26[0x2]; - float _gamma; // Save 00924d10 "Gamma="; Load 00924440; Lua Options::Gamma 00896c40 - float _exposure; // Save 00924d10 "Exposure="; Load 00924440 stores "Exposure" - float _brightness; // Load 00924440 stores the "Brightness" key here - float _contrast; // Load 00924440 stores the "Contrast" key here - bool _controlHotplugEnabled; // Save 00924d10 "ControllerHotplug="; Load 00924440 - uint8_t _pad_0x39[0x3]; - int _popupsMode; // Save 00924d10 "PopUps="; Load 00924440; Lua Options::DisplayPopups 00896ca0 - bool _enableFoundHUD; // Save 00924d10 "FoundHUD="; Load 00924440; Lua Options::FoundHUD 00896f20 - uint8_t _pad_0x41[0x3]; - int _cameraStyle; // Save 00924d10 "CameraStyle="; Lua Options::CameraStyle 00896e20 - int _historyHudMode; // Save 00924d10 "ShowRecentItems="; Lua Options::ExtraHUDStyle 00896e70 - float _hudOffset; // Save 00924d10 "HudOffset="; Lua Options::HUDOffset 00896ec0 - bool _tryImportSave; // Save 00924d10 "TryImportSave="; Load 00924440 - bool _enableMods; // Save 00924d10 "EnableMods="; Load 00924440 - bool _enableRumble; // Save 00924d10 "RumbleEnabled="; Lua Options::RumbleEnabled 00896f50 - bool _enableChargeBars; // Save 00924d10 "ChargeBars="; Lua Options::ChargeBars 00896f80 - bool _enableBulletVisibility; // Save 00924d10 "BulletVisibility="; Lua Options::BulletVisibility 00896fb0 - bool _enableAimLock; // Save 00924d10 "AimLock="; Load 00924440 - uint8_t _pad_0x56[0x2]; - int _touchMode; // Save 00924d10 "TouchMode="; Load 00924440 - bool _enableDebugConsole; // Save 00924d10 "EnableDebugConsole="; Lua Options::DebugConsoleEnabled 00897360 - uint8_t _pad_0x5d[0x3]; - int _consoleFont; // Save 00924d10 "ConsoleFont="; Load 00924440; Lua Options::ConsoleFont 008972a0 (REP 0x7c) - bool _enableFadedConsoleDisplay; // Save 00924d10 "FadedConsoleDisplay="; Lua Options::FadedConsoleDisplay 008972d0 (REP 0x80) - bool _enableSaveCommandHistory; // Save 00924d10 "SaveCommandHistory="; Lua Options::SaveCommandHistory 00897300 (REP 0x81) - bool _enableBorderlessFullscreen; // Save 00924d10 "UseExclusiveFullscreen=" (stored flag is exclusive); Lua Options::UseBorderlessFullscreen 00897330 returns !this[0x66] (REP 0x82) - bool _enableVSync; // Save 00924d10 "VSync="; Lua Options::VSync 00896fe0 (REP 0x5d) - bool _enableSteamCloud; // Save 00924d10 "SteamCloud="; Load 00924440 (REP 0x5e) - bool _enablePauseOnFocusLost; // Save 00924d10 "PauseOnFocusLost="; Lua Options::PauseOnFocusLost 00897010 (REP 0x5f) - bool _enableMouseControl; // Save 00924d10 "MouseControl="; Lua Options::MouseControl 00897040 (REP 0x60) - uint8_t _pad_0x6b[0x1]; - int _maxScale; // Save 00924d10 "MaxScale="; Lua Options::MaxScale 008970d0 (REP 0x64) - int _maxRenderScale; // Save 00924d10 "MaxRenderScale="; Lua Options::MaxRenderScale 00897250 (REP 0x68) - int _windowWidth; // Save 00924d10 "WindowWidth="; Load 00924440 (REP 0x6c) - int _windowHeight; // Save 00924d10 "WindowHeight="; Load 00924440 (REP 0x70) - int _windowPosX; // Save 00924d10 "WindowPosX="; Load 00924440 (REP 0x74) - int _windowPosY; // Save 00924d10 "WindowPosY="; Load 00924440 (REP 0x78) - bool _enableInterpolation; // Manager::Update 00954cd0 skips every other frame when this is 0; EntityList::Update 004186c0 branches on it; sits between WindowPosY 0x80 and EpicOverlay 0x85 (REP 0x83) - bool _enableEpicOverlay; // new: Save 00924d10 "EnableEpicOverlay="; Load 00924440 - bool _enableColorCorrection; // FUN_00951730 creates "Color Correction Surface" only if set; Manager::Render 009555c0 renders color correction when set (REP 0x84) - bool _enableLighting; // init_room_render_surfaces 007ea630 creates "Light Overlay Surface" only if set (REP 0x85) - bool _enableShockwave; // init_room_render_surfaces 007ea630 creates "Shockwave Surface" only if set (REP 0x86) - bool _enableCaustics; // init_room_render_surfaces 007ea630 loads gfx/backdrop/caustics.png only if set (REP 0x87) - bool _enableFilter; // FUN_00951730 makes the HQ4X surface only if set; Manager::Render 009555c0 uses it with _filterEnabled 0x25 (REP 0x88) - bool _enablePixelation; // Game::Render 006fbc10 gates the pixelation effect (Game +0x1ba78 state 2/3) on it (REP 0x89) - bool _enableBloom; // Game::create_render_surfaces 006f37e0 creates "Bloom Surface" only if set (REP 0x8a) - bool _enableWaterSurface; // Room::render_water 00820fd0 needs Room _waterAmount>0 and this (REP 0x8b) - bool _getsSetToEnableWaterSurface; // init_room_render_surfaces 007ea630 creates "Water Overlay Surface" and "Heat Wave Surface" only if set (REP 0x8c) - bool _enableColorModifier; // Game::Render 006fbc10 and MenuManager::Render 0098a040 apply the color-modifier pass only if set (REP 0x8d) - bool _bossHpOnBottom; // Save 00924d10 "BossHpOnBottom="; Load 00924440 (REP 0x8e) - uint8_t _pad_0x91[0x3]; - int _announcerVoiceMode; // Save 00924d10 "AnnouncerVoiceMode="; Lua Options::AnnouncerVoiceMode 00897080 (REP 0x90) - int _jacobEsauControls; // Save 00924d10 "JacobEsauControls="; Lua Options::JacobEsauControls 00897390 (REP 0x94) - bool _ascentVoiceover; // Save 00924d10 "AscentVoiceOver="; Load 00924440 (REP 0x98) - uint8_t _pad_0x9d[0x3]; - int _onlineHud; // Save 00924d10 "OnlineHud="; Load 00924440 (REP 0x9c) - bool _streamerMode; // Save 00924d10 "StreamerMode="; Load 00924440 (REP 0xa0) - uint8_t _pad_0xa5[0x3]; - int _onlinePlayerVolume; // Save 00924d10 "OnlinePlayerVolume="; Load 00924440 (REP 0xa4) - int _onlinePlayerOpacity; // Save 00924d10 "OnlinePlayerOpacity="; Load 00924440 (REP 0xa8) - bool _onlineChatEnabled; // Save 00924d10 "OnlineChatEnabled="; Load 00924440 (REP 0xac) - bool _onlineFilterEnabled; // Save 00924d10 "OnlineChatFilterEnabled="; Load 00924440 (REP 0xad) - uint8_t _pad_0xb2[0x2]; - int _onlineColorSet; // Save 00924d10 "MultiplayerColorSet="; Load 00924440 (REP 0xb0) - int _onlineInputDelay; // Save 00924d10 "OnlineInputDelay="; Load 00924440 (REP 0xb4) - bool _itemInfoDisplayEnabled; // new: Save 00924d10 "ItemInfoDisplayEnabled="; Load 00924440 - uint8_t _pad_0xbd[0x3]; - int _eosCrossplay; // new: Save 00924d10 "EosCrossplay="; Load 00924440; compared ==2/3 in online code (Manager+0x2a3fc) - bool _acceptedPublicBeta_VERSION; // Save 00924d10 "AcceptedPublicBeta_%s="; Load 00924440; disclaimer popup code (Manager+0x2a400) sets it to 1 (REP 0xb8) - bool _acceptedDataCollectionDisclaimer; // Save 00924d10 "AcceptedDataCollectionDisclaimer="; Load 00924440; disclaimer code (Manager+0x2a401) sets it (REP 0xba) - uint8_t _pad_0xc6[0x2]; -}; -static_assert(offsetof(OptionsConfig, _optionsIniFilePath) == 0x0); -static_assert(offsetof(OptionsConfig, _musicVolume) == 0x18); -static_assert(offsetof(OptionsConfig, _sfxVolume) == 0x1c); -static_assert(offsetof(OptionsConfig, _mapOpacity) == 0x20); -static_assert(offsetof(OptionsConfig, _isFullscreen) == 0x24); -static_assert(offsetof(OptionsConfig, _filterEnabled) == 0x25); -static_assert(offsetof(OptionsConfig, _gamma) == 0x28); -static_assert(offsetof(OptionsConfig, _exposure) == 0x2c); -static_assert(offsetof(OptionsConfig, _brightness) == 0x30); -static_assert(offsetof(OptionsConfig, _contrast) == 0x34); -static_assert(offsetof(OptionsConfig, _controlHotplugEnabled) == 0x38); -static_assert(offsetof(OptionsConfig, _popupsMode) == 0x3c); -static_assert(offsetof(OptionsConfig, _enableFoundHUD) == 0x40); -static_assert(offsetof(OptionsConfig, _cameraStyle) == 0x44); -static_assert(offsetof(OptionsConfig, _historyHudMode) == 0x48); -static_assert(offsetof(OptionsConfig, _hudOffset) == 0x4c); -static_assert(offsetof(OptionsConfig, _tryImportSave) == 0x50); -static_assert(offsetof(OptionsConfig, _enableMods) == 0x51); -static_assert(offsetof(OptionsConfig, _enableRumble) == 0x52); -static_assert(offsetof(OptionsConfig, _enableChargeBars) == 0x53); -static_assert(offsetof(OptionsConfig, _enableBulletVisibility) == 0x54); -static_assert(offsetof(OptionsConfig, _enableAimLock) == 0x55); -static_assert(offsetof(OptionsConfig, _touchMode) == 0x58); -static_assert(offsetof(OptionsConfig, _enableDebugConsole) == 0x5c); -static_assert(offsetof(OptionsConfig, _consoleFont) == 0x60); -static_assert(offsetof(OptionsConfig, _enableFadedConsoleDisplay) == 0x64); -static_assert(offsetof(OptionsConfig, _enableSaveCommandHistory) == 0x65); -static_assert(offsetof(OptionsConfig, _enableBorderlessFullscreen) == 0x66); -static_assert(offsetof(OptionsConfig, _enableVSync) == 0x67); -static_assert(offsetof(OptionsConfig, _enableSteamCloud) == 0x68); -static_assert(offsetof(OptionsConfig, _enablePauseOnFocusLost) == 0x69); -static_assert(offsetof(OptionsConfig, _enableMouseControl) == 0x6a); -static_assert(offsetof(OptionsConfig, _maxScale) == 0x6c); -static_assert(offsetof(OptionsConfig, _maxRenderScale) == 0x70); -static_assert(offsetof(OptionsConfig, _windowWidth) == 0x74); -static_assert(offsetof(OptionsConfig, _windowHeight) == 0x78); -static_assert(offsetof(OptionsConfig, _windowPosX) == 0x7c); -static_assert(offsetof(OptionsConfig, _windowPosY) == 0x80); -static_assert(offsetof(OptionsConfig, _enableInterpolation) == 0x84); -static_assert(offsetof(OptionsConfig, _enableEpicOverlay) == 0x85); -static_assert(offsetof(OptionsConfig, _enableColorCorrection) == 0x86); -static_assert(offsetof(OptionsConfig, _enableLighting) == 0x87); -static_assert(offsetof(OptionsConfig, _enableShockwave) == 0x88); -static_assert(offsetof(OptionsConfig, _enableCaustics) == 0x89); -static_assert(offsetof(OptionsConfig, _enableFilter) == 0x8a); -static_assert(offsetof(OptionsConfig, _enablePixelation) == 0x8b); -static_assert(offsetof(OptionsConfig, _enableBloom) == 0x8c); -static_assert(offsetof(OptionsConfig, _enableWaterSurface) == 0x8d); -static_assert(offsetof(OptionsConfig, _getsSetToEnableWaterSurface) == 0x8e); -static_assert(offsetof(OptionsConfig, _enableColorModifier) == 0x8f); -static_assert(offsetof(OptionsConfig, _bossHpOnBottom) == 0x90); -static_assert(offsetof(OptionsConfig, _announcerVoiceMode) == 0x94); -static_assert(offsetof(OptionsConfig, _jacobEsauControls) == 0x98); -static_assert(offsetof(OptionsConfig, _ascentVoiceover) == 0x9c); -static_assert(offsetof(OptionsConfig, _onlineHud) == 0xa0); -static_assert(offsetof(OptionsConfig, _streamerMode) == 0xa4); -static_assert(offsetof(OptionsConfig, _onlinePlayerVolume) == 0xa8); -static_assert(offsetof(OptionsConfig, _onlinePlayerOpacity) == 0xac); -static_assert(offsetof(OptionsConfig, _onlineChatEnabled) == 0xb0); -static_assert(offsetof(OptionsConfig, _onlineFilterEnabled) == 0xb1); -static_assert(offsetof(OptionsConfig, _onlineColorSet) == 0xb4); -static_assert(offsetof(OptionsConfig, _onlineInputDelay) == 0xb8); -static_assert(offsetof(OptionsConfig, _itemInfoDisplayEnabled) == 0xbc); -static_assert(offsetof(OptionsConfig, _eosCrossplay) == 0xc0); -static_assert(offsetof(OptionsConfig, _acceptedPublicBeta_VERSION) == 0xc4); -static_assert(offsetof(OptionsConfig, _acceptedDataCollectionDisclaimer) == 0xc5); - -struct StringTable { - uint8_t _pad_0x0[0xc]; - uint8_t _categories[0x8]; // std_map_cstr_StringTableCategory; ? Manager::destructor 00951160 erases trees at StringTable+4 (0x18-byte nodes) and +0xc (0x28-byte nodes, std::map); Game::ShowFortuneText 009807a0 map-finds a category name and compares with the head at Manager+0x4a92c, taking the entry count from the node for RNG::RandomInt -}; -static_assert(offsetof(StringTable, _categories) == 0xc); - -struct PopupButton { - ANM2 _sprite; // FUN_00423aa0 (Manager::Init) loads gfx/ui/ButtonPromptWidget.anm2 into each 0x130 record and plays LeftPrompt/RightPrompt; PopupButtons::Render 00423cc0 sets layer "Text" frame and renders it - float _slideOffset; // Manager::Update 00954cd0 (954fb1) moves +0x114 toward +0x118 by 6.0 per frame for both buttons; FUN_00424130 adds scale*it to the button's screen y; PopupButtons::reset 004239b0 sets 96 - float _targetSlideOffset; // PopupButtons::reset 004239b0 sets 96 (hidden below the screen) or 0 with arg 1 (slide in); MenuManager::Render 0098a040 / Manager::RestartGame / update_ingame_input set Manager+0x4aa68/+0x4ab98 to 96 or 0 to hide/show the prompts; Manager::Update 00954cd0 slides _slideOffset to it - int _textFrame; // PopupButtons::Render 00423cc0 ANM2::SetLayerFrame(sprite, "Text" layer, *(+0x11c)); reset 004239b0 sets 1 / 0; Cutscene::Show 0095e7c0 sets button 1 to 6 - bool _isVisible; // ? PopupButtons::reset 004239b0 sets 1; PopupButtons::Render 00423cc0 draws the action glyph only while it is set (and _buttonAction != 0x20) - uint8_t _pad_0x121[0x3]; - int _buttonAction; // PopupButtons::reset 004239b0 sets 0xf / 0xe (MENUBACK / MENUCONFIRM); PopupButtons::Render 00423cc0 looks it up in the input device's action table ("ActionId is out of range") and draws its glyph or name; Manager::Update 00954cd0 skips 0x20 - Vector _offset; // PopupButtons::reset 004239b0 zeroes it (g_vectorZero); FUN_00424130 adds +0x128/+0x12c to the button's screen position -}; -static_assert(offsetof(PopupButton, _sprite) == 0x0); -static_assert(offsetof(PopupButton, _slideOffset) == 0x114); -static_assert(offsetof(PopupButton, _targetSlideOffset) == 0x118); -static_assert(offsetof(PopupButton, _textFrame) == 0x11c); -static_assert(offsetof(PopupButton, _isVisible) == 0x120); -static_assert(offsetof(PopupButton, _buttonAction) == 0x124); -static_assert(offsetof(PopupButton, _offset) == 0x128); - -struct PopupButtons { - PopupButton _buttons[2]; // PopupButtons::reset 004239b0 resets records at +0x114.. and +0x244.. (0x130 apart); FUN_00424130 positions button 0 bottom-left and button 1 bottom-right; Manager::Update 00954cd0 loops 2 records of 0x130 - float _scale; // PopupButtons::reset 004239b0 sets 1.0; PopupButtons::Render 00423cc0 and FUN_00424130/004240b0 scale positions, sprite scale and glyphs by it; FUN_0095eb60 (cutscene callback) reads +0x260 - uint32_t _callback; // void* // PopupButtons::reset 004239b0 clears it; Cutscene::Show 0095e8dc stores 0x95eb60 at Manager+0x4abb4 (= +0x264); DeathScreen::Show installs FUN_008cb190 - uint32_t _callbackContext; // void* // PopupButtons::reset 004239b0 clears it; Cutscene::Show 0095e8e6 stores the Cutscene* at Manager+0x4abb8 (= +0x268) beside _callback -}; -static_assert(offsetof(PopupButtons, _buttons) == 0x0); -static_assert(offsetof(PopupButtons, _scale) == 0x260); -static_assert(offsetof(PopupButtons, _callback) == 0x264); -static_assert(offsetof(PopupButtons, _callbackContext) == 0x268); - -struct Manager { - uint8_t _pad_0x0[0x8]; - int _state; // 00954cd0 Manager::Update switch(this+8), saves prev to +0xc; 009595e0 IsGameplayInputActive tests ==2 (in game); ctor 00950610 zeroes it - int _previousState; // Manager::Update 00954cd0 saves _state here before switching to the cutscene state 3 and restores _state from it when the cutscene ends; Manager::Init 00952410 zeroes it - uint32_t _currentSaveSlot; // 00959e70 Manager::SetSaveSlot writes slot to [this+0x10] after PersistentGameData::Clear(this+0x14) - PersistentGameData _persistentGameData; // 00950610 ctor calls PersistentGameData ctor 00925f80 on this+0x14; 00959e70 SetSaveSlot Clear(this+0x14); TryUnlock/IncreaseEventCounter(g_Manager+0x14) x70 - GameState _gamestate; // 00950610 ctor calls 009c73c0 on this+0xfa4; 00959130 Game::DeleteSaveState GameState::Delete(g_Manager+0xfa4); SetSaveSlot uses this+0xfa4 - bool _isSavingGameState; // Manager::save_game_state 00958ed0 sets it to 1 around Game::store_game_state and clears it after saving; entity_type_is_saved 007eed10 forces true while it (or Game _isStoringGlowingHourglassState) is set - uint8_t _pad_0x20dcd[0x3]; - uint8_t _cutsceneManager[0x848]; // Cutscene; 00950610 ctor: CutsceneEntry[27] (0x4c) at +0x20dd4 = Cutscene+4; 00952df0 load_configs Cutscene::load_xml(this+0x20dd0); 00954cd0 Manager::Update Cutscene::Show(this+0x20dd0) - bool _isCutscenePending; // Manager::ShowCutscene 00958e60 and Game::End 006f9770 set it to 1; Manager::Update 00954cd0 then calls Cutscene::Show(_pendingCutsceneId), enters state 3 and clears it; BossOverlay::update 004212c0 sets it too - uint8_t _pad_0x21619[0x3]; - int _pendingCutsceneId; // Manager::ShowCutscene 00958e60 stores cutsceneID (<= 0x1a); Game::End 006f9770 stores 3/0xf/0x10..; Manager::Update 00954cd0 passes it to Cutscene::Show(&_cutsceneManager, id) - bool _isCutsceneCleanupPending; // Manager::ShowCutscene 00958e60 stores its shouldCleanup argument; Manager::Update 00954cd0 unloads the game state (unload_state) before the cutscene and, after it, goes to _cutsceneNextMenuState with the fade color when set - uint8_t _pad_0x21621[0x3]; - int _cutsceneNextMenuState; // Manager::ShowCutscene 00958e60 stores its 3rd argument; Manager::Update 00954cd0 copies it into _pendingMenuState and calls start_pending_menu after a cleanup cutscene; Game::End 006f9770 stores the menu to return to - NightmareScene _nightmareScene; // 00950610 ctor ANM2s at +0x20/+0x134/+0x248/+0x4d4 of 0x21628 (= REPENTOGON NightmareScene layout); 00954cd0 Update NightmareScene::Show(this+0x21628); 009555c0 Render NightmareScene::Render(this+0x21628) - uint8_t _pad_0x219cc[0x250]; - AchievementOverlay _achievementOverlay; // 005cd810 trivial getter returns g_Manager+0x21c1c (GetAchievementOverlay); ctor 00950610: ANM2 at +0x20, vector of 0x34-byte entries at +0x134, zeroes +0x14/+0x1c (displayedachievement/status) - MusicManager _musicManager; // 00428cd0 Lua MusicManager() returns g_Manager+0x29fbc; the Lua class is MusicManager (lua_fields), so the member gets that struct - uint8_t _pad_0x2a2e8[0x3c]; - SoundEffects _sfxManager; // 00420af0 Lua SFXManager() returns g_Manager+0x2a324; = Music+0x368 (Music size) - OptionsConfig _optionsConfig; // 00417900 getter returns g_Manager+0x2a33c; OptionsConfig::Save(g_Manager+0x2a33c); Lua Options::MusicVolume 00896810 reads +0x2a354 (= _musicVolume +0x18) - ItemConfig _itemConfig; // 0042ca00 Lua Isaac::GetItemConfig returns g_Manager+0x2a404; ctor calls 00724cb0 on this+0x2a404 - uint8_t _pad_0x2a514[0x1c]; - InfoDisplay _infoDisplay; // ctor 00950610 builds 4 maps (0x128-byte nodes) at +0x2a530/+0x2a538/+0x2a540/+0x2a548 then InfoDisplayEntry ctor; Manager::destructor 00951160 InfoDisplay::~InfoDisplay between ItemConfig and the challenge vector; InfoDisplayConfig::parse_item_node 00854940 ECX=Manager+0x2a530 - uint8_t _pad_0x2a554[0x110]; - uint8_t _challengeParams[0xc]; // vector_ChallengeParam; Manager::GetChallengeParams 009569a0 returns begin + min(id, (end-begin)/0xa4 - 1)*0xa4 from +0x2a664/+0x2a668; Menu_CustomChallenge::Update/Render, check_challenge_unlocks; ctor zeroes begin/end/cap, destructor std::vector<164byte>::_Tidy - EntityConfig _entityConfig; // 00417910 getter returns g_Manager+0x2a670; 004186c0 EntityList::Update calls EntityConfig::GetEntity with ECX=g_Manager+0x2a670; players vector at +8 (0x2a678/0x2a67c, /0x148 stride, 44 uses) - uint8_t _pad_0x2a6a8[0x18]; - uint8_t _modManager[0x20260]; // ModManager; 0040d210 getter returns g_Manager+0x2a6c0; ModManager::TryRedirectPath(g_Manager+0x2a6c0) many; ctor: vector +0, memset(+0xc,0,0x20000) redirect table, +0x2025c modBanStatus - StringTable _stringTable; // 004253c0 getter returns g_Manager+0x4a920; string_table_translate(g_Manager+0x4a920,"#...") 118 uses; 00951920 load_fonts reads language at +0 - uint8_t _pad_0x4a934[0x4]; - StringTable _stringTablePc; // Manager::Init 00952410 StringTable::Load(this+0x4a938,"stringtable_pc.sta") right after stringtable.sta into +0x4a920; ModManager::UpdateWorkshopMods translates "#MOD_UNINSTALLING" with it; Manager::destructor clears the two tables (maps +0x4a924/+0x4a92c and +0x4a93c/+0x4a944) - uint8_t _pad_0x4a94c[0x4]; - PopupButtons _popupButtons; // Manager ctor 00950610 eh-vector-ctor 2 x 0x130 at +0x4a950 (FUN_00951130 = ANM2 ctor + fields); Manager::Init 00954733 loads gfx/ui/ButtonPromptWidget.anm2 into both (FUN_00423aa0); Manager::Update 00954cd0 slides them; Manager::Render 00955c7f calls PopupButtons::Render; Cutscene::Show 0095e7c0 / DeathScreen::Show / online_stats_finalize call PopupButtons::reset on it; ends at _framecount 0x4abbc - uint32_t _framecount; // 0086f090 Lua Isaac::GetFrameCount returns *(g_Manager+0x4abbc) - int _consecutiveResetCount; // Manager::RestartGame 00958cb0 increments it when its progresScaredHeart argument is set (else zeroes) and unlocks achievement 0x148 (Mr. Resetter) once > 6; StartNewGame 00958aa0 / Menu_Game::Update / Menu_DailyChallenge::Update / Manager::Init zero it - uint8_t _pad_0x4abc4[0x3]; - bool _isHotkeysEnabled; // Manager::update_hotkeys 009548d0 skips all hotkeys (music mute toggle, fullscreen...) when this+0x4abc7 is 0; Console::Update 0068b260 clears it while the console is open; Menu_KeyConfig::Update 008d8b00 sets it to !rebinding; Manager::Init sets 1 - uint8_t _pad_0x4abc8[0x9]; - bool _isConsoleEnabled; // 00952410 Manager::Init copies options _enableDebugConsole (0x2a398) to +0x4abd1; Game::Start/StartDebug copy it into Game+0x269d0 - uint8_t _pad_0x4abd2[0x2]; - int _activeControllerIndex; // input_poll_active_device 00954b40 stores the index (device+0xc) of the first device with a pressed action and, in game, Entity_Player::SetControllerIndex(player 0) with it; Manager::Init 00952410 zeroes it - uint8_t _pad_0x4abd8[0xc]; - ANM2 _buttonsSprite; // 00952410 Manager::Init ANM2::Load(this+0x4abe4,"gfx/ui/Buttons.anm2") - ANM2 _platformIconsSprite; // 00952410 Manager::Init ANM2::Load(this+0x4acf8,"gfx/ui/PlatformIcons.anm2") (new, not in REPENTOGON) - uint8_t _pad_0x4ae0c[0x1c]; - Font _font1_TeamMeatEx10; // 00951920 load_fonts Font::Load(this+0x4ae28,"font/TeamMeatEx/TeamMeatEx10.fnt") - Font _font2_TeamMeatEx12; // 00951920 load_fonts loads TeamMeatEx12.fnt into this+0x4ae74 - Font _font3_TeamMeatEx16; // 00951920 load_fonts loads TeamMeatEx16.fnt into this+0x4aec0 - Font _font4_terminus; // 00952df0 load_configs loads "font/terminus.fnt" into this+0x4af0c - Font _font5_terminus8; // 00952df0 load_configs loads "font/terminus8.fnt" into this+0x4af58 - Font _font6_PFTempestaSevenCondensed; // 00952df0 load_configs loads "font/PFTempestaSevenCondensed.fnt" into this+0x4afa4 - Font _font7_Upheaval; // 00951920 load_fonts unload/load Upheaval into this+0x4aff0; ctor 9 Font ctors 00a1a640 at 0x4ae28 + n*0x4c - Font _font8_LuaMiniOutlined; // 00952df0 load_configs loads "font/LuaMiniOutlined.fnt" into this+0x4b03c - Font _font9_PFTempestaSevenCondensedAgain; // 00951920 load_fonts reloads PFTempestaSevenCondensed into this+0x4b088 (9th Font ctor) - int _selectedDifficulty; // Menu_Character::handle_input 0094c580 sets it to Difficulty; Menu_Game::Update 00981140 (Continue) copies the saved GameState difficulty (Manager+0xfac); FUN_00951f60 tests ==2||3 (greed); Manager::Init zeroes it - LobbySettings _lobbySettings; // LobbySettings::reset 0085b050/0085b280 compares ECX to Manager+0x4b0d8 before re-running Menu_OnlineLobby::init_lobby_view; size 0x54 (ints +0..+0xc, strings +0x18/+0x30, vector +0x48) ends before _starting 0x4b130 - uint8_t _pad_0x4b120[0x10]; - bool _starting; // 00958aa0 StartNewGame sets 1; 009595e0 IsGameplayInputActive tests it with _networkPlay - bool _rerunAvailable; // 00958aa0 StartNewGame clears word at 0x4b131; 00959720 start dispatcher branches on it then clears it (rerun path) - bool _startingFromRerun; // 00958aa0 StartNewGame clears (word at 0x4b131); 00959720 start dispatcher tests and clears it - uint8_t _pad_0x4b133[0x1]; - int _startPlayerType; // Manager::StartNewGame 00958aa0 stores playerType here, challenge at +0x4b138 and difficulty at +0x4b198; Manager::save_game_state copies it into GameState; Console::RunCommand sets it - int _startChallenge; // Manager::StartNewGame 00958aa0 stores the challenge argument here - Seeds _startSeeds; // 00950610 ctor Seeds::constructor(this+0x4b13c); 00959720 Seeds::construct_from_copy(local, this+0x4b13c) before starting the game - int _startDifficulty; // Manager::StartNewGame 00958aa0 stores the difficulty argument here (after the _startSeeds copy) - bool _debugStart; // 00958aa0 StartNewGame clears; 00959720 dispatcher tests it to choose start args; Menu_Game::Update 00981140 clears - uint8_t _pad_0x4b19d[0x23]; - DailyChallenge _dailyChallenge; // 00958c40 DailyChallenge::Init(ECX=g_Manager+0x4b1c0); StartNewGame zeroes +0/+4/+8(byte)/+0xc = _id/_seed/_isPractice/_specialDailyId; ctor ChallengeParam ctor at +0x10 - bool _networkPlay; // 00958aa0 StartNewGame clears; 009595e0 IsGameplayInputActive: starting && networkPlay; 00959720 dispatcher tests it first - uint8_t _pad_0x4b275[0x3]; - uint8_t _lobbyMembers[0xc]; // vector_LobbyMember; ? 0x14-byte entries whose +4 points at a user object with a 64-bit id at +8/+0xc: Menu_OnlineLobby::init_lobby_view 008e9ac0, online_vote_update 0091c320 and write_game_state_to_stream 009172f0 (writes count (end-begin)/0x14 then each id); NetplayManager::send_message 0090eca0 - bool _isSaveOnExit; // Manager::unload_state 00959670 passes byte this+0x4b284 to Game::Exit(ShouldSave); start_pending_game 00959720 sets it (word 1); Game::DeleteSaveState 00959130 / RestartGame 00958cb0 / Init clear it; Console::RunCommand sets 1 after the rerun restart - uint8_t _pad_0x4b285[0x3]; - bool _isMenuPending; // Game::Update 006fadc0 sets it (with _pendingMenuState and the fade color) when the end fade completes; Manager::start_pending_menu 00959d00 tests it, unloads the game and calls MenuManager::SetState(_pendingMenuState) - uint8_t _pad_0x4b289[0x3]; - int _pendingMenuState; // Manager::start_pending_menu 00959d00 MenuManager::SetState(this+0x4b28c,1) and skips netplay_leave_lobby when it is 0x11; Game::Update 006fadc0 sets 1/2/3/0x13 by fade target; Manager::Update copies the cutscene's next state (Cutscene+0x854) - KColor _pendingMenuFadeColor; // Game::Update 006fadc0 stores the KColor::SetFromARGB result in +0x4b290..+0x4b2a0; Manager::start_pending_menu 00959d00 copies the 5 dwords to MenuManager _fadeInColor (+0x1c..+0x2c) - bool _isNightmarePending; // StageTransition::Update 0092f1c0 / ItemOverlay::Update 009aca90 set it with the nightmare id in +0x4b2a5; Manager::Update 00954cd0 then calls NightmareScene::Show(this+0x21628, +0x4b2a5), enters state 5 and clears it; Init 00952410 clears - uint8_t _pad_0x4b2a5[0x3]; - ANM2 _cursorSprite; // 00952410 Manager::Init ANM2::Load(this+0x4b2a8,"gfx/ui/cursor.anm2") - Vector _lastMousePosition; // Manager::Update 00954cd0 compares the window cursor position with +0x4b3bc/+0x4b3c0 and stores it; Manager::Render 009555c0 draws _cursorSprite at it scaled to the window - int _cursorVisibleTimer; // Manager::Update 00954cd0 sets it to 300 when the mouse moves, else decrements to 0; Manager::Render 009555c0 draws _cursorSprite only while > 0 (mouse control on, state 1/2); Manager::Init zeroes it - uint8_t _pad_0x4b3c8[0x1]; - bool _isRenderSurfaceResetPending; // Manager::update_screen_scale 00954150 sets it; Manager::Render 009555c0 then resets the render-target smart pointers, calls create_render_surfaces, re-reads the window size and clears it; Manager::Init zeroes it - bool _isWindowFocused; // FUN_009aa020 (focus callback) sets it to param!=0; Game::Update 006fadc0 shows the pause screen when it is 0 and Options PauseOnFocusLost is on (offline); Game::interpolate_update gates on it; Manager::Init sets 1 - uint8_t _pad_0x4b3cb[0xd]; - uint8_t _netplayManager[0x4]; // NetplayManager; 00417920 getter returns this+0x4b3d8; 006d8e10 is_local_player_owned: ECX=g_Manager+0x4b3d8 -> NetplayManager::IsIdxLocalPlayer; ctor calls 00906260 on it (misnamed SaveSlotManager::constructor) -}; -static_assert(offsetof(Manager, _state) == 0x8); -static_assert(offsetof(Manager, _previousState) == 0xc); -static_assert(offsetof(Manager, _currentSaveSlot) == 0x10); -static_assert(offsetof(Manager, _persistentGameData) == 0x14); -static_assert(offsetof(Manager, _gamestate) == 0xfa4); -static_assert(offsetof(Manager, _isSavingGameState) == 0x20dcc); -static_assert(offsetof(Manager, _cutsceneManager) == 0x20dd0); -static_assert(offsetof(Manager, _isCutscenePending) == 0x21618); -static_assert(offsetof(Manager, _pendingCutsceneId) == 0x2161c); -static_assert(offsetof(Manager, _isCutsceneCleanupPending) == 0x21620); -static_assert(offsetof(Manager, _cutsceneNextMenuState) == 0x21624); -static_assert(offsetof(Manager, _nightmareScene) == 0x21628); -static_assert(offsetof(Manager, _achievementOverlay) == 0x21c1c); -static_assert(offsetof(Manager, _musicManager) == 0x29fbc); -static_assert(offsetof(Manager, _sfxManager) == 0x2a324); -static_assert(offsetof(Manager, _optionsConfig) == 0x2a33c); -static_assert(offsetof(Manager, _itemConfig) == 0x2a404); -static_assert(offsetof(Manager, _infoDisplay) == 0x2a530); -static_assert(offsetof(Manager, _challengeParams) == 0x2a664); -static_assert(offsetof(Manager, _entityConfig) == 0x2a670); -static_assert(offsetof(Manager, _modManager) == 0x2a6c0); -static_assert(offsetof(Manager, _stringTable) == 0x4a920); -static_assert(offsetof(Manager, _stringTablePc) == 0x4a938); -static_assert(offsetof(Manager, _popupButtons) == 0x4a950); -static_assert(offsetof(Manager, _framecount) == 0x4abbc); -static_assert(offsetof(Manager, _consecutiveResetCount) == 0x4abc0); -static_assert(offsetof(Manager, _isHotkeysEnabled) == 0x4abc7); -static_assert(offsetof(Manager, _isConsoleEnabled) == 0x4abd1); -static_assert(offsetof(Manager, _activeControllerIndex) == 0x4abd4); -static_assert(offsetof(Manager, _buttonsSprite) == 0x4abe4); -static_assert(offsetof(Manager, _platformIconsSprite) == 0x4acf8); -static_assert(offsetof(Manager, _font1_TeamMeatEx10) == 0x4ae28); -static_assert(offsetof(Manager, _font2_TeamMeatEx12) == 0x4ae74); -static_assert(offsetof(Manager, _font3_TeamMeatEx16) == 0x4aec0); -static_assert(offsetof(Manager, _font4_terminus) == 0x4af0c); -static_assert(offsetof(Manager, _font5_terminus8) == 0x4af58); -static_assert(offsetof(Manager, _font6_PFTempestaSevenCondensed) == 0x4afa4); -static_assert(offsetof(Manager, _font7_Upheaval) == 0x4aff0); -static_assert(offsetof(Manager, _font8_LuaMiniOutlined) == 0x4b03c); -static_assert(offsetof(Manager, _font9_PFTempestaSevenCondensedAgain) == 0x4b088); -static_assert(offsetof(Manager, _selectedDifficulty) == 0x4b0d4); -static_assert(offsetof(Manager, _lobbySettings) == 0x4b0d8); -static_assert(offsetof(Manager, _starting) == 0x4b130); -static_assert(offsetof(Manager, _rerunAvailable) == 0x4b131); -static_assert(offsetof(Manager, _startingFromRerun) == 0x4b132); -static_assert(offsetof(Manager, _startPlayerType) == 0x4b134); -static_assert(offsetof(Manager, _startChallenge) == 0x4b138); -static_assert(offsetof(Manager, _startSeeds) == 0x4b13c); -static_assert(offsetof(Manager, _startDifficulty) == 0x4b198); -static_assert(offsetof(Manager, _debugStart) == 0x4b19c); -static_assert(offsetof(Manager, _dailyChallenge) == 0x4b1c0); -static_assert(offsetof(Manager, _networkPlay) == 0x4b274); -static_assert(offsetof(Manager, _lobbyMembers) == 0x4b278); -static_assert(offsetof(Manager, _isSaveOnExit) == 0x4b284); -static_assert(offsetof(Manager, _isMenuPending) == 0x4b288); -static_assert(offsetof(Manager, _pendingMenuState) == 0x4b28c); -static_assert(offsetof(Manager, _pendingMenuFadeColor) == 0x4b290); -static_assert(offsetof(Manager, _isNightmarePending) == 0x4b2a4); -static_assert(offsetof(Manager, _cursorSprite) == 0x4b2a8); -static_assert(offsetof(Manager, _lastMousePosition) == 0x4b3bc); -static_assert(offsetof(Manager, _cursorVisibleTimer) == 0x4b3c4); -static_assert(offsetof(Manager, _isRenderSurfaceResetPending) == 0x4b3c9); -static_assert(offsetof(Manager, _isWindowFocused) == 0x4b3ca); -static_assert(offsetof(Manager, _netplayManager) == 0x4b3d8); - -struct Menu_Character { - int Status; // Menu_Character::Reset 00948fc0 sets 0; Status==1 picks the seeds view position, handle_input 0094c580 tests *this==0 - uint8_t _pad_0x4[0x1]; - bool IsCharacterUnlocked; // Menu_Character::UpdateRotations 0094d500 sets it to IsCharacterAvailable(SelectedCharacterID); Reset sets 1 - bool IsInputPossible; // UpdateRotations 0094d500 clears it while the wheel turns and sets it when it settles; Reset sets 1 - uint8_t _pad_0x7[0x1]; - int Difficulty; // Reset 00948fc0 copies Manager+0xf20 (difficulty); Update 00949c20 switches on it - int CooldownWhenHoldDirection; // handle_input 0094c580 decrements it and reloads 10 on left/right; Reset sets 10 - int SelectedCharacterID; // Reset 00948fc0 sets 1; compared to 0x12 (entry count) and indexes g_MenuCharacterEntries[sel + menu*0x12] - uint8_t _pad_0x14[0x4]; - float _randomRotationVelocity; // UpdateRotations 0094d500 lerps it toward the random spin target; Reset sets 0 - uint8_t _pad_0x1c[0x4]; - int _randomRotationAmount; // UpdateRotations 0094d500 uses (amount-60)/-60 as spin progress - float _characterWheelDepth; // written by Reset 00948fc0, read by UpdateRotations 0094d500 as (depth-1)*t+1 - float _scrollSpeed; // Reset sets 360/numChars/(x*50); UpdateRotations reads it - float _characterWheelWidth; // written by Reset 00948fc0, read by UpdateRotations 0094d500 - uint8_t _pad_0x30[0x4]; - float _greedDecoAlpha; // Menu_Character::Render 0094a500 eases it +0.05 toward 1 while Difficulty is 2/3 (greed), -0.05 toward 0 otherwise, and writes it as _GreedDecoOverlaySprite tint alpha - float _PositionX; // ctor 00946e70 zeroes it right before _BigCharPageSprite 0x40 - float _PositionY; // ctor 00946e70 zeroes it right before _BigCharPageSprite 0x40 - ANM2 _BigCharPageSprite; // ctor 00946e70 ANM2::constructor at this+0x40 - ANM2 _DifficultyOverlaySprite; // ctor 00946e70 ANM2 at +0x154 - ANM2 _GreedDecoOverlaySprite; // ctor 00946e70 ANM2 at +0x268 - ANM2 _CharacterMenuBGSprite; // ctor 00946e70 ANM2 at +0x37c - uint8_t _completionWidget[0x11c]; // CompletionWidget; ctor 00946e70 builds a sub-object at +0x490 (its ANM2 at +0x494) - ANM2 _DifficultyPageSprite; // ctor 00946e70 ANM2 at +0x5ac; Reset 00948fc0 plays "Unlocked"/"AB+" on it - ANM2 _SeedPageSprite; // ctor 00946e70 ANM2 at +0x6c0 - ANM2 _WinStreakPageSprite; // ctor 00946e70 ANM2 at +0x7d4 - ANM2 _EastereggPageSprite; // ctor 00946e70 ANM2 at +0x8e8 - Vector _eastereggPagePosition; // Menu_Character::Render 0094a500 sets it to menu offset + _PositionX/Y + (404,238) and renders _EastereggPageSprite there (plus its "ButtonIcon" null) - ANM2 _SeedUnlockPageSprite; // ctor 00946e70 ANM2 at +0xa04 - int _numCharacters; // Reset 00948fc0 counts available g_MenuCharacterEntries into it - int _numCharacters_MINUS_SelectedEntry; // Reset sets numCharacters-1; UpdateRotations 0094d500 angle = 360/n * this - ANM2 _CharacterPortraitsSprite; // ctor 00946e70 ANM2 at +0xb20 - float _horizontalScrollPosition; // Reset 00948fc0 = (n-1)*360/numCharacters; UpdateRotations eases it - uint8_t _portraitPositions[0xc]; // vector_Vector; Reset 00948fc0 resizes this std::vector (begin c38/end c3c/cap c40, 8-byte elems) to _numCharacters filled with (240,135); UpdateRotations 0094d500 writes each wheel position; render_portraits 0094bee0 reads them - uint8_t _portraitScales[0xc]; // vector_float; Reset 00948fc0 resizes this std::vector (c44/c48/c4c) to _numCharacters filled with 1.0; UpdateRotations 0094d500 writes 1/depth per character; render_portraits 0094bee0 copies it next to the position - ANM2 _SeedEntrySprite; // ctor 00946e70 ANM2 at +0xc50; Update checks Status==1 and its _loaded - uint8_t _seedText[0x18]; // std_string; Reset 00948fc0 clears this std::string (size +0xd74, cap +0xd78); Render 0094a500 draws it in groups of 4 on _SeedPageSprite when non-empty; handle_input 0094c580 edits it - int _seedUnlockPageState; // Menu_Character::Update 00949c20 state machine for _SeedUnlockPageSprite: 1 Appear -> 2 shown -> 3 disappear -> 0; Render 0094a500 draws the page while !=0; Reset zeroes it - int _seedUnlockPageTimer; // Menu_Character::Update 00949c20 counts frames in state 2 and switches _seedUnlockPageState to 3 after 60, zeroing it; Reset 00948fc0 zeroes it - uint8_t _pad_0xd84[0x30]; - int _characterMenuShown; // selects CharacterMenu/CharacterPortraits anm2 path pair [this*3] and entries [sel+this*0x12] (normal/tainted) - ANM2 _PageSwapWidgetSprite; // ctor 00946e70 ANM2 at +0xdb8 - ANM2 _TaintedMenuBGDecoSprite; // ctor 00946e70 ANM2 at +0xecc (size ends 0xfe8, SpecialSeeds follows at MenuManager+0x251c) -}; -static_assert(offsetof(Menu_Character, Status) == 0x0); -static_assert(offsetof(Menu_Character, IsCharacterUnlocked) == 0x5); -static_assert(offsetof(Menu_Character, IsInputPossible) == 0x6); -static_assert(offsetof(Menu_Character, Difficulty) == 0x8); -static_assert(offsetof(Menu_Character, CooldownWhenHoldDirection) == 0xc); -static_assert(offsetof(Menu_Character, SelectedCharacterID) == 0x10); -static_assert(offsetof(Menu_Character, _randomRotationVelocity) == 0x18); -static_assert(offsetof(Menu_Character, _randomRotationAmount) == 0x20); -static_assert(offsetof(Menu_Character, _characterWheelDepth) == 0x24); -static_assert(offsetof(Menu_Character, _scrollSpeed) == 0x28); -static_assert(offsetof(Menu_Character, _characterWheelWidth) == 0x2c); -static_assert(offsetof(Menu_Character, _greedDecoAlpha) == 0x34); -static_assert(offsetof(Menu_Character, _PositionX) == 0x38); -static_assert(offsetof(Menu_Character, _PositionY) == 0x3c); -static_assert(offsetof(Menu_Character, _BigCharPageSprite) == 0x40); -static_assert(offsetof(Menu_Character, _DifficultyOverlaySprite) == 0x154); -static_assert(offsetof(Menu_Character, _GreedDecoOverlaySprite) == 0x268); -static_assert(offsetof(Menu_Character, _CharacterMenuBGSprite) == 0x37c); -static_assert(offsetof(Menu_Character, _completionWidget) == 0x490); -static_assert(offsetof(Menu_Character, _DifficultyPageSprite) == 0x5ac); -static_assert(offsetof(Menu_Character, _SeedPageSprite) == 0x6c0); -static_assert(offsetof(Menu_Character, _WinStreakPageSprite) == 0x7d4); -static_assert(offsetof(Menu_Character, _EastereggPageSprite) == 0x8e8); -static_assert(offsetof(Menu_Character, _eastereggPagePosition) == 0x9fc); -static_assert(offsetof(Menu_Character, _SeedUnlockPageSprite) == 0xa04); -static_assert(offsetof(Menu_Character, _numCharacters) == 0xb18); -static_assert(offsetof(Menu_Character, _numCharacters_MINUS_SelectedEntry) == 0xb1c); -static_assert(offsetof(Menu_Character, _CharacterPortraitsSprite) == 0xb20); -static_assert(offsetof(Menu_Character, _horizontalScrollPosition) == 0xc34); -static_assert(offsetof(Menu_Character, _portraitPositions) == 0xc38); -static_assert(offsetof(Menu_Character, _portraitScales) == 0xc44); -static_assert(offsetof(Menu_Character, _SeedEntrySprite) == 0xc50); -static_assert(offsetof(Menu_Character, _seedText) == 0xd64); -static_assert(offsetof(Menu_Character, _seedUnlockPageState) == 0xd7c); -static_assert(offsetof(Menu_Character, _seedUnlockPageTimer) == 0xd80); -static_assert(offsetof(Menu_Character, _characterMenuShown) == 0xdb4); -static_assert(offsetof(Menu_Character, _PageSwapWidgetSprite) == 0xdb8); -static_assert(offsetof(Menu_Character, _TaintedMenuBGDecoSprite) == 0xecc); - -struct Menu_Stats { - int _countTotalAchievements; // Menu_Stats::Update 009ecbc0 zeroes it then counts unlocked achievements (0x282 loop) - int _countItemsInCollection; // Menu_Stats::Update 009ecbc0 counts touched collectibles (0x2dd loop over Manager+0xafc) - int _countDeaths; // Menu_Stats::Update 009ecbc0 copies Manager+0x2f8 (deaths stat) - int _countMomKills; // Menu_Stats::Update 009ecbc0 copies Manager+0x2d4 (mom kills stat) - int _statsMenuCurrentSelection; // FUN_009ede60 (stats-page update called by Update when the achievement screen is closed) reads/writes it 11x - float _PositionX; // Menu_Stats::Render 009ecdd0 adds it to the draw position; ctor (MenuManager::constructor 00986450) zeroes it - float _PositionY; // Menu_Stats::Render 009ecdd0 adds it to the draw position; ctor zeroes it - ANM2 _StatsMenuSprite; // MenuManager::constructor 00986450 ANM2 at Stats+0x1c; Update 009ecbc0 animates it - bool _isAchievementScreenVisible; // Menu_Stats::Update 009ecbc0 calls update_achievements when set, else FUN_009ede60 - uint8_t _pad_0x131[0x3]; - float _achievementScrollInPosition; // update_achievements 009ee2a0 sets 275.0 then slides it down by 2 to 240 - float _achievementScrollThruListPosition; // update_achievements 009ee2a0 advances it by 2*_scrollSpeed and resets it to 0 per step - int _selectedAchievmentId; // update_achievements 009ee2a0 steps it +-1 and wraps it at _maxAchievementID; indexes _achievementIDList - int _IconIDtoUseForAchievementID[642]; // update_achievements 009ee2a0 reads [this+i*4+0x140]; 642 entries now (achievementsSprite moved to 0xb48) - ANM2 _achievementsSprite; // MenuManager::constructor 00986450 ANM2 at Stats+0xb48; update_achievements uses it 16x (REP 0xb44) - ANM2 _achievementMiniSprite1; // MenuManager::constructor 00986450 eh_vector_constructor of 11 ANM2 at Stats+0xc5c (9 minis + 2 cursors) (REP 0xc58) - ANM2 _achievementMiniSprite2; // 2nd of the 11-ANM2 run at +0xc5c (ctor 00986450); FUN_009ede60 uses it - ANM2 _achievementMiniSprite3; // 3rd of the 11-ANM2 run at +0xc5c (ctor 00986450) - ANM2 _achievementMiniSprite4; // 4th of the 11-ANM2 run at +0xc5c (ctor 00986450) - ANM2 _achievementMiniSprite5; // 5th of the 11-ANM2 run (ctor 00986450); update_achievements 009ee2a0 uses +0x10ac - ANM2 _achievementMiniSprite6; // 6th of the 11-ANM2 run at +0xc5c (ctor 00986450) - ANM2 _achievementMiniSprite7; // 7th of the 11-ANM2 run at +0xc5c (ctor 00986450) - ANM2 _achievementMiniSprite8; // 8th of the 11-ANM2 run (ctor 00986450); FUN_009ede60 uses +0x13e8 - ANM2 _achievementMiniSprite9; // 9th of the 11-ANM2 run (ctor 00986450); FUN_009ede60 uses +0x14fc - ANM2 _cursorLeftSprite; // 10th of the 11-ANM2 run (ctor 00986450); Render 009ecdd0 uses +0x1640/+0x1660 inside it - ANM2 _cursorRightSprite; // 11th of the 11-ANM2 run (ctor 00986450); Render 009ecdd0 uses +0x1754/+0x1774 inside it - AchievementOverlay_Entry _achievementOverlayEntries[642]; // ctor 00986450 eh_vector_constructor 0x282 x 0x34 at Stats+0x1838; Update 009ecbc0 tests [i*0x34+0x1838]==i (REP 0x1834[641]) - int _achievementIDList[642]; // update_achievements 009ee2a0 and load_achievements_xml 009ed780 index [this+i*4+0x9aa0] (REP 0x9a68[641]) - int _maxAchievementID; // load_achievements_xml 009ed780 fills it (13 refs); update_achievements wraps _selectedAchievmentId at it (REP 0xa46c) - int _holdInputTimer; // update_achievements 009ee2a0 counts held frames, accelerates past 0x3c/0xb4, resets to 0 (REP 0xa470) - float _scrollSpeed; // update_achievements 009ee2a0 computes it from the hold timer and adds 2x it to the list position (REP 0xa474) -}; -static_assert(offsetof(Menu_Stats, _countTotalAchievements) == 0x0); -static_assert(offsetof(Menu_Stats, _countItemsInCollection) == 0x4); -static_assert(offsetof(Menu_Stats, _countDeaths) == 0x8); -static_assert(offsetof(Menu_Stats, _countMomKills) == 0xc); -static_assert(offsetof(Menu_Stats, _statsMenuCurrentSelection) == 0x10); -static_assert(offsetof(Menu_Stats, _PositionX) == 0x14); -static_assert(offsetof(Menu_Stats, _PositionY) == 0x18); -static_assert(offsetof(Menu_Stats, _StatsMenuSprite) == 0x1c); -static_assert(offsetof(Menu_Stats, _isAchievementScreenVisible) == 0x130); -static_assert(offsetof(Menu_Stats, _achievementScrollInPosition) == 0x134); -static_assert(offsetof(Menu_Stats, _achievementScrollThruListPosition) == 0x138); -static_assert(offsetof(Menu_Stats, _selectedAchievmentId) == 0x13c); -static_assert(offsetof(Menu_Stats, _IconIDtoUseForAchievementID) == 0x140); -static_assert(offsetof(Menu_Stats, _achievementsSprite) == 0xb48); -static_assert(offsetof(Menu_Stats, _achievementMiniSprite1) == 0xc5c); -static_assert(offsetof(Menu_Stats, _achievementMiniSprite2) == 0xd70); -static_assert(offsetof(Menu_Stats, _achievementMiniSprite3) == 0xe84); -static_assert(offsetof(Menu_Stats, _achievementMiniSprite4) == 0xf98); -static_assert(offsetof(Menu_Stats, _achievementMiniSprite5) == 0x10ac); -static_assert(offsetof(Menu_Stats, _achievementMiniSprite6) == 0x11c0); -static_assert(offsetof(Menu_Stats, _achievementMiniSprite7) == 0x12d4); -static_assert(offsetof(Menu_Stats, _achievementMiniSprite8) == 0x13e8); -static_assert(offsetof(Menu_Stats, _achievementMiniSprite9) == 0x14fc); -static_assert(offsetof(Menu_Stats, _cursorLeftSprite) == 0x1610); -static_assert(offsetof(Menu_Stats, _cursorRightSprite) == 0x1724); -static_assert(offsetof(Menu_Stats, _achievementOverlayEntries) == 0x1838); -static_assert(offsetof(Menu_Stats, _achievementIDList) == 0x9aa0); -static_assert(offsetof(Menu_Stats, _maxAchievementID) == 0xa4a8); -static_assert(offsetof(Menu_Stats, _holdInputTimer) == 0xa4ac); -static_assert(offsetof(Menu_Stats, _scrollSpeed) == 0xa4b0); - -struct Menu_Online { - uint8_t _pad_0x0[0x4]; - ANM2 _anm2; // Menu_Online::enter 008e5260 ANM2::SetAnimation(this+4, "Idle"); Menu_Online::Update 008e4b10 GetLayer(this+4, "Cursor") + SetLayerFrame(.., _state); Render 008e4e30 GetLayer(this+4, "BackKey") - uint8_t _pad_0x118[0x114]; - int _prevState; // Menu_Online::Update 008e4b10 (asm 008e4b83/008e4be7): a held-input repeat counter, not a previous state: the cursor moves only when it is 0 or >0x31 and %10 == 0, then it is incremented (reset to 0 when no input); Menu_Online::enter 008e5260 sets it to 1 - int _state; // Menu_Online::Update 008e4b10 (asm 008e4ba8..008e4c18) cycles it 0..4 (Quick Match/Public Match/Friend Match/Daily Run/Options) and switches on it when confirming; Render 008e4e30 picks the #Online/ONLINE_*_DESCRIPTOR text from it -}; -static_assert(offsetof(Menu_Online, _anm2) == 0x4); -static_assert(offsetof(Menu_Online, _prevState) == 0x22c); -static_assert(offsetof(Menu_Online, _state) == 0x230); - -struct MenuManager { - uint8_t _menuStateHistory[0xc]; // std_vector_uint; new: FUN_0098ae20 (menu state push) appends the new menu id to the vector at +0/+4/+8 (begin/end/cap) before calling SetState FUN_0098aa30; ctor 00986450 zeroes all three - bool _state; // REP int, only a byte here: SetState FUN_0098aa30 sets it to 1 on a menu change; MenuManager::Update 009897d0 eases _ViewPosition toward _viewPositionSet[_selectedMenuID] while set and clears it on arrival - bool _fadeOutActive; // new: MenuManager::Update 009897d0 adds 0.025 to _fadeOutProgress each frame while set; Render 0098a040 draws the fade when set - uint8_t _pad_0xe[0x2]; - float _fadeOutProgress; // MenuManager::Update 009897d0 += 0.025 while 0xd is set; Render 0098a040 uses it as the fade alpha - bool _fadeInActive; // REP int, only a byte here: Update 009897d0 subtracts 0.025 from _fadeInProgress while set; Render 0098a040 clears it once progress <= 0; FUN_00959d00 sets it after copying the fade color - uint8_t _pad_0x15[0x3]; - float _fadeInProgress; // Update 009897d0 -= 0.025 while _fadeInActive; Render 0098a040 uses it as alpha and zeroes it at <= 0 - KColor _fadeInColor; // ctor 00986450 KColor::SetFromARGB(0xff000000) on this+0x1c; FUN_00959d00 copies a color into +0x1c..+0x2c; Render 0098a040 draws the fade-in with it - uint8_t _pad_0x30[0x4]; - float _vingnetteIntensity; // Render 0098a040 eases it by 0.025 toward 0.5 when Menu_Character.Difficulty (+0x153c) is 1 or 3, else 0, and draws an overlay with that alpha - uint8_t _pad_0x38[0x8]; - int _selectedMenuID; // SetState FUN_0098aa30 writes the new menu id here; Update 009897d0 and Render 0098a040 switch on it; ctor zeroes it - Vector _ViewPosition; // Update 009897d0 eases +0x44/+0x48 toward _viewPositionSet[_selectedMenuID]; Render 0098a040 adds it to sprite positions - ANM2 _MenuShadowSprite; // ctor 00986450 ANM2::constructor on this+0x4c - uint8_t _pad_0x160[0x18]; - Seeds _seedsObject; // ctor 00986450 Seeds::constructor 009e9290 on this+0x178 - uint8_t _menuTitle[0x120]; // Menu_Title; ctor 00986450 ESI=this+0x1d4: PositionX/Y +0/+4 zeroed, TitleScreenSprite ANM2 at +8 (as REP); its size is 0x120 now (word at +0x11c) - uint8_t _menuSave[0x89c]; // Menu_Save; ctor 00986450 ESI=this+0x2f4: +0x10/+0x14 zeroed, ANM2 at +0x18, 3 ANM2 at +0x12c, ANM2 +0x470, +0x584 = REP's inner layout; REP 0x2f8 (-4) - uint8_t _menuGame[0x244]; // Menu_Game; ctor 00986450 ESI=this+0xb90: +8/+0xc zeroed, ANM2 at +0x10 and +0x124 (as REP); size is 0x244 now (+0x240 = -1) - uint8_t _menuDailyChallenge[0x760]; // Menu_DailyChallenge; ctor 00986450 EDI=this+0xdd4: +0..+0x10 zeroed, ANM2 +0x14, popup at +0x13c, prompt at +0x270, Leaderboard ctor FUN_00856f70 at +0x3a4 (REP 0xdd0, +4) - Menu_Character _menuCharacter; // ctor 00986450 calls the Menu_Character ctor FUN_00946e70 with this+0x1534; Render 0098a040 reads +0x153c as Menu_Character.Difficulty (REP 0x1530, +4) - uint8_t _pad_0x2514[0x8]; - uint8_t _menuSpecialSeeds[0x16c]; // Menu_SpecialSeeds; ctor 00986450 ESI=this+0x251c, SpecialSeedsSprite ANM2 at +0x1c (REP 0x2518, +4) - uint8_t _menuChallenge[0x130]; // Menu_Challenge; ctor 00986450 ESI=this+0x2688: +0xc/+0x10 zeroed, ANM2 at +0x14, +0x128/+0x12c (REP 0x2684, +4) - uint8_t _menuCollection[0x260]; // Menu_Collection; ctor 00986450 ESI=this+0x27b8: ANM2 at +0x14 and +0x128, +0x240..+0x258 zeroed (REP 0x27b4, +4) - Menu_Stats _menuStats; // ctor 00986450 ESI=this+0x2a18: ANM2 +0x1c, +0xb48, 11 ANM2 at +0xc5c, 0x282 x 0x34 entries at +0x1838; Render 0098a040 case 9 reads +0x2b48 (Stats+0x130) (REP 0x2a14, +4) - uint8_t _menuOptions[0x288]; // Menu_Options; ctor 00986450 calls FUN_009b1fc0 (Options ctor: ANM2 at +0x24, +0x138 as REP) with this+0xcecc (REP 0xce8c, +0x40) - uint8_t _menuControllerSelect[0x130]; // Menu_ControllerSelect; ctor 00986450 ESI=this+0xd154: +8/+0xc zeroed, ANM2 at +0x10, +0x124..+0x12c (REP 0xd114, +0x40) - uint8_t _menuKeyConfig[0x128]; // Menu_KeyConfig; ctor 00986450 ECX=this+0xd284: +0xc/+0x10 zeroed, ANM2 at +0x14; SetState FUN_0098aa30 resets +0xd288/+0xd28c when entering state 0xc (REP 0xd244, +0x40) - uint8_t _menuCutscenes[0x124]; // Menu_Cutscenes; ctor 00986450 ECX=this+0xd3ac: +8/+0xc zeroed, ANM2 at +0x10 (REP 0xd36c, +0x40) - uint8_t _menuBestiary[0x378]; // Menu_Bestiary; ctor 00986450 ESI=this+0xd4d0: PositionX/Y +0/+4, ANM2 at +8, +0x11c, +0x230, +0x350..+0x364 zeroed (REP 0xd490, +0x40) - uint8_t _menuCustomChallenge[0x124]; // Menu_CustomChallenge; MenuManager::Update 009897d0 calls Menu_CustomChallenge::Update(this+0xd848); ctor ANM2 at +0xd858 (REP 0xd808, +0x40) - uint8_t _menuMods[0x12c]; // Menu_Mods; ctor 00986450 ESI=this+0xd96c: +8/+0xc zeroed, ANM2 at +0x10, +0x128 (REP 0xd92c, +0x40) - uint8_t _menuOnline[0x4]; // Menu_Online; MenuManager::Update 009897d0 Menu_Online::Update(this+0xda98); MenuManager::Render 0098a040 Menu_Online::Render(this+0xda98); ctor 00986450 stores "gfx/ui/main menu/OnlineMenu.anm2" at its first dword, LoadGraphics 00988d80 loads it - ANM2 _onlineMenuSprite; // MenuManager::constructor 00986450 stores "gfx/ui/main menu/OnlineMenu.anm2" at +0xda98 and builds ANM2 at +0xda9c; LoadGraphics 00988d80 ANM2::Load(+0xda9c, that path) + Play Idle; unload_graphics 00988ba0 resets it (Menu_Mods ends at 0xd96c+0x12c = 0xda98) - uint8_t _pad_0xdbb0[0x1a1c]; - ANM2 _onlineStatsMenuSprite; // MenuManager::LoadGraphics 00988d80 ANM2::Load(+0xf5cc,"gfx/ui/main menu/OnlineStatsMenu.anm2") + Play Idle; MenuManager::Update 009897d0 sets its "Cursor" layer frame; ctor builds it, unload_graphics resets it - uint8_t _pad_0xf6e0[0x24]; - Vector _viewPositionSet[23]; // ctor 00986450 zeroes 23 Vectors from +0xf704 (ends at the 0xf7bc bool); Update 009897d0 reads +0xf704/+0xf708 + id*8; SetState writes [12].x (+0xf768) for state 0xc (REP 0xf70c, -8) - bool _shouldLerpColorModState; // MenuManager::Update 009897d0 lerps while set and clears it once the lerp equals the target; ctor 00986450 sets it to 0 (REP 0xf7c4, -8) - uint8_t _pad_0xf7bd[0x3]; - ColorModState _currentColorModState; // Render 0098a040 sends +0xf7c0..c8 as tint and +0xf7cc/+0xf7d0/+0xf7d4 as the "Amount"/"Brightness"/"Contrast" uniforms; ctor sets (1,1,1,0,0,1) (REP 0xf7c8, -8) - ColorModState _targetColorModState; // Update 009897d0 FUN_006ef410(this+0xf7d8, this+0xf7f0) and compares the result with +0xf7d8..+0xf7ec; ctor (1,1,1,0,0,1) (REP 0xf7e0, -8) - ColorModState _lerpColorModState; // second ColorModState arg of the lerp in Update 009897d0; ctor (1,1,1,0,0,1) at +0xf7f0..+0xf804 (REP 0xf7f8, -8) - float _scrollinterpolationX; // -8 like its neighbours; Update 009897d0 sets it to viewPositionSet[1].x + 364 + dist^2*0.004 and Render 0098a040 draws the fly sprite at _ViewPosition + (this, +0xf80c), so it is really the fly's offset (REP 0xf810) - float _scrollinterpolationY; // Update 009897d0 sets viewPositionSet[1].y + 176 + dist*0.004; Render 0098a040 fly sprite y offset (REP 0xf814) - uint8_t _pad_0xf810[0x8]; - ANM2 _flySprite; // ctor 00986450 ANM2 at this+0xf818 (via ECX=+0xf808,+0x10); Update 009897d0 bobs its layers 0/1 with sin(frame%80); Render 0098a040 draws it (REP 0xf820, -8) -}; -static_assert(offsetof(MenuManager, _menuStateHistory) == 0x0); -static_assert(offsetof(MenuManager, _state) == 0xc); -static_assert(offsetof(MenuManager, _fadeOutActive) == 0xd); -static_assert(offsetof(MenuManager, _fadeOutProgress) == 0x10); -static_assert(offsetof(MenuManager, _fadeInActive) == 0x14); -static_assert(offsetof(MenuManager, _fadeInProgress) == 0x18); -static_assert(offsetof(MenuManager, _fadeInColor) == 0x1c); -static_assert(offsetof(MenuManager, _vingnetteIntensity) == 0x34); -static_assert(offsetof(MenuManager, _selectedMenuID) == 0x40); -static_assert(offsetof(MenuManager, _ViewPosition) == 0x44); -static_assert(offsetof(MenuManager, _MenuShadowSprite) == 0x4c); -static_assert(offsetof(MenuManager, _seedsObject) == 0x178); -static_assert(offsetof(MenuManager, _menuTitle) == 0x1d4); -static_assert(offsetof(MenuManager, _menuSave) == 0x2f4); -static_assert(offsetof(MenuManager, _menuGame) == 0xb90); -static_assert(offsetof(MenuManager, _menuDailyChallenge) == 0xdd4); -static_assert(offsetof(MenuManager, _menuCharacter) == 0x1534); -static_assert(offsetof(MenuManager, _menuSpecialSeeds) == 0x251c); -static_assert(offsetof(MenuManager, _menuChallenge) == 0x2688); -static_assert(offsetof(MenuManager, _menuCollection) == 0x27b8); -static_assert(offsetof(MenuManager, _menuStats) == 0x2a18); -static_assert(offsetof(MenuManager, _menuOptions) == 0xcecc); -static_assert(offsetof(MenuManager, _menuControllerSelect) == 0xd154); -static_assert(offsetof(MenuManager, _menuKeyConfig) == 0xd284); -static_assert(offsetof(MenuManager, _menuCutscenes) == 0xd3ac); -static_assert(offsetof(MenuManager, _menuBestiary) == 0xd4d0); -static_assert(offsetof(MenuManager, _menuCustomChallenge) == 0xd848); -static_assert(offsetof(MenuManager, _menuMods) == 0xd96c); -static_assert(offsetof(MenuManager, _menuOnline) == 0xda98); -static_assert(offsetof(MenuManager, _onlineMenuSprite) == 0xda9c); -static_assert(offsetof(MenuManager, _onlineStatsMenuSprite) == 0xf5cc); -static_assert(offsetof(MenuManager, _viewPositionSet) == 0xf704); -static_assert(offsetof(MenuManager, _shouldLerpColorModState) == 0xf7bc); -static_assert(offsetof(MenuManager, _currentColorModState) == 0xf7c0); -static_assert(offsetof(MenuManager, _targetColorModState) == 0xf7d8); -static_assert(offsetof(MenuManager, _lerpColorModState) == 0xf7f0); -static_assert(offsetof(MenuManager, _scrollinterpolationX) == 0xf808); -static_assert(offsetof(MenuManager, _scrollinterpolationY) == 0xf80c); -static_assert(offsetof(MenuManager, _flySprite) == 0xf818); - -struct PathFinder { - uint8_t _pad_0x0[0x4]; - Vector _movementTarget; // same struct as NPCAI_Pathfinder: PathFinder::MoveRandomly 007e6300 picks a random destination into +4/+8 when zero, steers toward it, zeroes it on arrival; Reset 007e3260 zeroes it - uint8_t _pad_0xc[0x720]; - bool _hasDirectPath; - uint8_t _pad_0x72d[0xf]; - int _evadeMovementCountdown; -}; -static_assert(offsetof(PathFinder, _movementTarget) == 0x4); -static_assert(offsetof(PathFinder, _hasDirectPath) == 0x72c); -static_assert(offsetof(PathFinder, _evadeMovementCountdown) == 0x73c); - -struct PlayerHUDActiveItem { - uint8_t _pad_0x0[0x4]; - int _bookItemId; // ? PlayerHUD::Update 00842230 reloads the book overlay only when the item id (0x248 Book of Virtues, 0x22 Book of Belial, 0x3b) differs from PlayerHUD+0x194+i*0x1c and then stores it - uint8_t _pad_0x8[0x8]; - uint8_t _bookImage[0x4]; // KAGE_SmartPointer_ImageBase; PlayerHUD::Update 00842230 swaps Manager::LoadImage("gfx/ui/hud_BookOfVirtues.png"/BookOfBelial/WithBelial) into PlayerHUD+0x1a0/+0x1a4+i*0x1c (entry+0x10/+0x14, REPENTOGON bookImage +0x10) -}; -static_assert(offsetof(PlayerHUDActiveItem, _bookItemId) == 0x4); -static_assert(offsetof(PlayerHUDActiveItem, _bookImage) == 0x10); - -struct PlayerHUD { - uint32_t _player; // Entity_Player* // HUD::FlashChargeBar 009a2bc0 / InvalidateActiveItem 009a2c00 match *(PlayerHUD+0)==player, stride 0x6dc - uint32_t _HUD; // HUD* // HUD reset FUN_009a19a0 writes PlayerHUD[i]+4 = HUD this - short _playerHudIndex; // HUD reset FUN_009a19a0 writes (short)i to PlayerHUD[i]+8 - short _lastHeartFlash; // PlayerHUD::Update 00842230 sets (9-f)*255/9 while the player has exactly one heart (frame%45<10, not with Holy Mantle 313 effect), else 0; RenderHearts 00843df0 uses it /255 as heart color offset - int8_t _redHeartFlashCountdown; // PlayerHUD::UpdateHearts 00841e20 flashes RedHeartFull/CoinHeart/RottenHeart when >0; PlayerHUD::Update 00842230 decrements - int8_t _soulHeartFlashCountdown; // PlayerHUD::UpdateHearts 00841e20 flashes BlueHeart* when >0; PlayerHUD::Update 00842230 decrements - int8_t _goldHeartFlashCountdown; // PlayerHUD::RenderHearts 00843df0 tests it with heart gold flag; PlayerHUD::Update 00842230 decrements; reset 00841cf0 zeroes - uint8_t _pad_0xf[0x181]; - PlayerHUDActiveItem _activeItem[4]; // HUD::InvalidateActiveItem 009a2c00 zeroes PlayerHUD+0x190+i*0x1c; FlashChargeBar 009a2bc0 writes +0x1a8+i*0x1c = 8 (same as REPENTOGON) - uint8_t _pad_0x1e0[0x4cd]; - bool _isCraftingItemDirty; // HUD::InvalidateCraftingItem 009a2c70 sets PlayerHUD[i]+0x6ad=1 for the player (or all); Entity_Player::bag_of_crafting_collect 007d5170 sets it on pickup - uint8_t _pad_0x6ae[0x2]; -}; -static_assert(offsetof(PlayerHUD, _player) == 0x0); -static_assert(offsetof(PlayerHUD, _HUD) == 0x4); -static_assert(offsetof(PlayerHUD, _playerHudIndex) == 0x8); -static_assert(offsetof(PlayerHUD, _lastHeartFlash) == 0xa); -static_assert(offsetof(PlayerHUD, _redHeartFlashCountdown) == 0xc); -static_assert(offsetof(PlayerHUD, _soulHeartFlashCountdown) == 0xd); -static_assert(offsetof(PlayerHUD, _goldHeartFlashCountdown) == 0xe); -static_assert(offsetof(PlayerHUD, _activeItem) == 0x190); -static_assert(offsetof(PlayerHUD, _isCraftingItemDirty) == 0x6ad); - -struct PosVel { - Vector _position; // Lua PosVel.Position via binder 0087d130: getter 008bde40 copies 8 bytes into UserdataValue - Vector _velocity; // Lua PosVel.Velocity via binder 0087d130: getter 008bde40 copies 8 bytes into UserdataValue -}; -static_assert(offsetof(PosVel, _position) == 0x0); -static_assert(offsetof(PosVel, _velocity) == 0x8); - -struct ProjectileParams { - bool GridCollision; - uint8_t _pad_0x1[0x3]; - float HeightModifier; - float FallingSpeedModifier; - float FallingAccelModifier; - float VelocityMulti; - float Scale; - float CircleAngle; - float HomingStrength; - float CurvingStrength; - float Acceleration; - float Spread; - ColorMod Color; - uint64_t BulletFlags; - Vector PositionOffset; - Vector TargetPosition; - Vector FireDirectionLimit; - float DotProductLimit; - int32_t WiggleFrameOffset; - uint64_t ChangeFlags; - float ChangeVelocity; - uint32_t ChangeTimeout; - float DepthOffset; - uint32_t Variant; -}; -static_assert(offsetof(ProjectileParams, GridCollision) == 0x0); -static_assert(offsetof(ProjectileParams, HeightModifier) == 0x4); -static_assert(offsetof(ProjectileParams, FallingSpeedModifier) == 0x8); -static_assert(offsetof(ProjectileParams, FallingAccelModifier) == 0xc); -static_assert(offsetof(ProjectileParams, VelocityMulti) == 0x10); -static_assert(offsetof(ProjectileParams, Scale) == 0x14); -static_assert(offsetof(ProjectileParams, CircleAngle) == 0x18); -static_assert(offsetof(ProjectileParams, HomingStrength) == 0x1c); -static_assert(offsetof(ProjectileParams, CurvingStrength) == 0x20); -static_assert(offsetof(ProjectileParams, Acceleration) == 0x24); -static_assert(offsetof(ProjectileParams, Spread) == 0x28); -static_assert(offsetof(ProjectileParams, Color) == 0x2c); -static_assert(offsetof(ProjectileParams, BulletFlags) == 0x58); -static_assert(offsetof(ProjectileParams, PositionOffset) == 0x60); -static_assert(offsetof(ProjectileParams, TargetPosition) == 0x68); -static_assert(offsetof(ProjectileParams, FireDirectionLimit) == 0x70); -static_assert(offsetof(ProjectileParams, DotProductLimit) == 0x78); -static_assert(offsetof(ProjectileParams, WiggleFrameOffset) == 0x7c); -static_assert(offsetof(ProjectileParams, ChangeFlags) == 0x80); -static_assert(offsetof(ProjectileParams, ChangeVelocity) == 0x88); -static_assert(offsetof(ProjectileParams, ChangeTimeout) == 0x8c); -static_assert(offsetof(ProjectileParams, DepthOffset) == 0x90); -static_assert(offsetof(ProjectileParams, Variant) == 0x94); - -struct Room { - uint8_t _pad_0x0[0x4]; - uint32_t _descriptor; // RoomDescriptor* // Room::GetDecorationSeed 004aae80 returns (this+4)->+0x58 (DecorationSeed); GetRoomShape 0042a270 reads (this+4)->Data->+0x48 - uint32_t _roomType; // Lua Room:GetType bound to folded getter 0043eec0 (return this+8); GetLightingAlpha 0081e250 compares it to 8/0x1d; UpdateGreedWave 00801ee0 ==5 (boss) - uint32_t _gridWidth; // Lua Room:GetGridWidth bound to folded getter 004176f0 (return this+0xc); Backdrop::Init 0093d960 uses room+0xc/+0x10 as width/height - uint32_t _gridHeight; - Vector _topLeftPos; - Vector _bottomRightPos; - uint32_t _gridEntities[448]; // GridEntity* // Room::SpawnGridEntity 007ebca0 deletes/stores the new GridEntity at this+0x24+idx*4; CheckLine 007f0df0 bounds idx <= 0x1bf (REPENTOGON says [0x1BF]; 0x24+0x700 = 0x724 = _doors) - uint32_t _doors[8]; // GridEntity_Door* // Room::GetDoor 00436020 returns this+0x724+slot*4 (slot -1..7); TrySpawnDevilRoomDoor 007f83b0 / MakeDoor 007eea90 use it - int _doorGridPositions[8]; // Camera::constructor 009428d0 converts room+0x744+enterDoor*4 to a position with gridWidth (x%w*40+40, x/w*40+120); Room::UpdateRedKey 008271e0 spawns outlines at the same index - int _tintedRockIdx; - int _dungeonRockIdx; - int _gridPaths[448]; // Lua Room:GetGridPath 004565c0 / SetGridPath 0042a290 read/write this+0x76c+idx*4 for idx < 0x1c0; SetGridPath 004565e0 only overwrites values < 951 - uint8_t _pad_0xe6c[0x380]; - int _roomClearDelay; // Room::KeepDoorsClosed (0085e0f0) sets this+0x11ec=10; Room::Update (00802980) resets it to 10 (20 in some boss rooms) while enemies/greed wave remain and otherwise counts it down; NPC AIs test it (< 9) as the room-clear countdown - int _enterFrame; // Room::GetFrameCount 00813ce0 returns Game _frameCount - this+0x11f0 (-1 if room not initialised); Room::Update 00802980 runs first-frame logic on _frameCount - it == 1 / 4 - uint8_t _pad_0x11f4[0x4]; - uint32_t _Camera; // Camera* // AIs call Camera::IsPosVisible / Camera::SetFocusPosition with *(Room+0x11f8) (NpcAI::ENTITY_ADVERSARY, ENTITY_DOGMA, ENTITY_SISTERS_VIS); FUN_00428a70 returns it - Vector _renderSurfaceTopLeft; - Vector _renderScrollOffset; - bool _redHeartDamage; - uint8_t _pad_0x120d[0x3]; - uint32_t _brokenWatchState; // Room::GetBrokenWatchState 0081edd0 returns it (2 in challenge 0x16); SetBrokenWatchState 0081edf0 writes it then calls time_scale_update 007ea2d0 - uint8_t _pad_0x1214[0x4]; - uint8_t _entityList[0xa4]; // EntityList; Lua Room:GetEntities (00428a50) returns this+0x1258 = EntityList+0x40 (_updateEL); ~157 callers run EntityList::QuerySublist on Room+0x1218 - int _renderMode; - int32_t _aliveEnemyCount; // Entity_Player::spawn_dark_esau 007b0070 decrements it for a spawned NPC whose vtable slot 18 (CanShutDoors) is true; AIs read Room+0x12c0 + 0x12c4 as the door-holding enemy count (Gate 0045fc00, Cage 004878a0) - uint8_t _pad_0x12c4[0x4]; - int32_t _aliveBossCount; // spawn_dark_esau 007b0070 decrements it when slot 19 (IsBoss) is also true; Cage/Sisters Vis subtract 0x12c8 + 0x12cc from the enemy count (non-boss enemies) - uint8_t _pad_0x12cc[0x34c]; - uint8_t _fxLayers[0x598]; // FXLayers; Room::LoadBackdropGraphics calls FXLayers::LoadConfig (00990a40) and Room::Render calls FXLayers::Render (009948f0) / render_veins with ECX=Room+0x1618 - uint32_t _bossId; - int _secondBossID; - uint8_t _pad_0x1bb8[0x10]; - uint8_t _backdrop[0x150]; // Backdrop; Room::LoadBackdropGraphics 007f1380 calls Backdrop::Init(room+0x1bc8); Backdrop::Init writes backdropId at +0x150 = room+0x1d18 (Lua GetBackdropType 004cdd20) - int _backdropType; - uint8_t _pad_0x1d1c[0x5124]; - ANM2 _lightSprite; // ctor 007e9400 ANM2::constructor; lighting helper 00806c20 (called by Room::render_lighting 0080ea80, ZHL-misnamed Game::Render) plays Light/flame/sparks and sets its _scale (+0x9c = 0x6edc/0x6ee0) per light source; render_player_light 0080bd20 / render_grid_entity_light 0080c810 render it - uint8_t _pad_0x6f54[0x114]; - int _shopLevel; - int _shopRestockTimer; // Room::TriggerRestock 00815800 sets 30; Room::Update 00802980 counts it down and calls ShopRestockPartial at 0 (then -1); on_leave 007efa50 flushes it the same way - uint8_t _shopItemDeque[0x14]; // deque_ShopRestockDesc; Room::constructor 007e9400 builds a std::deque (proxy new(8), 5 dwords 0x7070..0x7080); Room::TriggerRestock 00815800 / ShopRestockPartial 008158a0 use 0x7074..0x7080 - uint8_t _pad_0x7084[0x1a5]; - bool _hasTriggerPressurePlates; - uint8_t _pad_0x722a[0x2]; - int _slowdownDuration; // Lua Room:HasSlowDown 00456710 (0 < this+0x722c) / SetSlowDown 00456720 (max); Room::Update 00802980 decrements it; REPENTOGON 0x7220 is wrong/shifted +0xc - uint8_t _pad_0x7230[0x4]; - uint8_t _pendingGridRemovals[8]; // std::set (ctor 007e9400 head node 0x14 bytes); Room::Update 00802980 destroys the grid entity at every index in it, then clears it; filled by Room::Init 007f2800 - int _greedWaveTimer; // Room::UpdateGreedWave 00801ee0: greed only, decrements, clamps to 0x13, calls SpawnGreedModeWave at 0 - float _waterAmount; // Room::HasWater 008208c0 and render_water_shader 00821950 read it; rain init 00824350 requires >0 - KColor _waterColor; // ctor 007e9400 KColor::SetFromARGB(-1) at 0x7244; render_water_shader 00821950 lerps 0x7244 -> 0x726c - KColor _waterColorMultiplier; // ctor 007e9400 KColor at 0x7258; render_water_shader 00821950 lerps 0x7258 -> 0x7280 - KColor _waterLerpTargetColor; // ctor 007e9400 KColor at 0x726c; lerp target of 0x7244 in render_water_shader 00821950 - KColor _waterLerpTargetColorMult; // ctor 007e9400 KColor at 0x7280; lerp target of 0x7258 in render_water_shader 00821950 - int _waterLerpColorDuration; // render_water_shader 00821950: t = 1 - countdown(0x7298)/duration(0x7294) - int _waterLerpColorCountdown; // render_water_shader 00821950: t = 1 - countdown(0x7298)/duration(0x7294) - uint8_t _pad_0x729c[0x4]; - bool _isFirstEnemyDead; - bool _pacifist; // Entity_NPC::TakeDamage 006d60a0 clears it on player/familiar-source damage; Entity_Familiar::PickEnemyTarget 00615030 / HandleCollision 006261f0 hold off while set; reset 00821940 - uint8_t _pad_0x72a2[0x2]; - ColorMod _floorColor; // Lua Room:SetFloorColor 007e91b0 copies 0x2c bytes to 0x72a4; ctor 007e9400 inits it - ColorMod _wallColor; // Lua Room:SetWallColor 007e91f0 copies 0x2c bytes to 0x72d0; ctor 007e9400 inits it - uint8_t _pad_0x72fc[0xc]; - uint8_t _litGridIndices[8]; // ? std::set (ctor 007e9400 head node); Room::render_lighting 0080ea80 clears it each frame, lighting helper 00806c20 looks entities' grid index up in it before drawing their light - TemporaryEffects _temporaryEffects; // ctor 007e9400 inits 0x7310..0x7324 in TemporaryEffects layout (vector +4, 2 bools +0x10, player +0x14); getter 004360d0 returns this+0x7310, its callers then call TemporaryEffects::AddCollectibleEffect - uint8_t _outputGroupGridIndices[80]; // std::set[10] (ctor 007e9400 vector ctor 8 x 10); Room::TriggerOutput 00823080 calls GridEntity::trigger_output on every grid index in set[group] - uint8_t _outputGroupCallbacks[120]; // std::vector[10] (ctor 007e9400 vector ctor 0xc x 10); Room::TriggerOutput 00823080 calls each function in vector[group] - uint8_t _pad_0x73f0[0x64]; - int _numRainSpawners; // rain init 00824350 zeroes it, then fills spawner array 0x73f4 (stride 0x18) and increments it; Room::update_ambient_sounds 00800500 reads it - float _rainIntensity; // rain init 00824350 sets 1.0; Room::update_ambient_sounds 00800500 reads it - bool _isRainStopped; // Lua Room:StopRain 005784d0 sets 1; rain init 00824350 clears it; Room::update_ambient_spawns 00824800 / NpcAI::ENTITY_RAINMAKER 00578a70 read it (REPENTOGON lacks this) - uint8_t _pad_0x745d[0x3]; - Vector _waterCurrent; // Lua Room:GetWaterCurrent 00505c50 returns this+0x7460/0x7464; Room::Init 007f2800 sets it from table 0xc5d0e8 - uint8_t _railManager[0x2d8]; // RailManager; ctor 007e9400 writes this to +0x7468 (RailManager._room) and builds its ANM2; Room::Render passes ECX=room+0x7468 to RailManager::Render 009e2f20; rail byte grid at +0x746c - float _lavaIntensity; // Lua Room:GetLavaIntensity 007120c0 returns this+0x7740 - uint8_t _redDoorOutlines[0x148]; // EntityPtr; ctor 007e9400 builds 8 EntityPtr (ctor 0042a020 / dtor 00579700 multiset erase); Room::UpdateRedKey 008271e0 spawns effect 1000.154 per free door slot and stores it with multiset insert, clears them without Red Key - float _beastBlastForce; // ? only NpcAI::ENTITY_BEAST 00592460 uses it: grows by +-0.2 (cap 7/7.5, sign from flipX) while shooting, decays 0.05/0.8/0.9/0.95, and pushes the colliding entity with -it (+0xbb8); ctor 007e9400 zeroes it - uint8_t _pad_0x7890[0x4]; - bool _isPickupVisionInvalid; // Lua Room:InvalidatePickupVision 005b16c0 sets this+0x7894 = 1 (REPENTOGON lacks this) - uint8_t _pad_0x7895[0x3]; -}; -static_assert(offsetof(Room, _descriptor) == 0x4); -static_assert(offsetof(Room, _roomType) == 0x8); -static_assert(offsetof(Room, _gridWidth) == 0xc); -static_assert(offsetof(Room, _gridHeight) == 0x10); -static_assert(offsetof(Room, _topLeftPos) == 0x14); -static_assert(offsetof(Room, _bottomRightPos) == 0x1c); -static_assert(offsetof(Room, _gridEntities) == 0x24); -static_assert(offsetof(Room, _doors) == 0x724); -static_assert(offsetof(Room, _doorGridPositions) == 0x744); -static_assert(offsetof(Room, _tintedRockIdx) == 0x764); -static_assert(offsetof(Room, _dungeonRockIdx) == 0x768); -static_assert(offsetof(Room, _gridPaths) == 0x76c); -static_assert(offsetof(Room, _roomClearDelay) == 0x11ec); -static_assert(offsetof(Room, _enterFrame) == 0x11f0); -static_assert(offsetof(Room, _Camera) == 0x11f8); -static_assert(offsetof(Room, _renderSurfaceTopLeft) == 0x11fc); -static_assert(offsetof(Room, _renderScrollOffset) == 0x1204); -static_assert(offsetof(Room, _redHeartDamage) == 0x120c); -static_assert(offsetof(Room, _brokenWatchState) == 0x1210); -static_assert(offsetof(Room, _entityList) == 0x1218); -static_assert(offsetof(Room, _renderMode) == 0x12bc); -static_assert(offsetof(Room, _aliveEnemyCount) == 0x12c0); -static_assert(offsetof(Room, _aliveBossCount) == 0x12c8); -static_assert(offsetof(Room, _fxLayers) == 0x1618); -static_assert(offsetof(Room, _bossId) == 0x1bb0); -static_assert(offsetof(Room, _secondBossID) == 0x1bb4); -static_assert(offsetof(Room, _backdrop) == 0x1bc8); -static_assert(offsetof(Room, _backdropType) == 0x1d18); -static_assert(offsetof(Room, _lightSprite) == 0x6e40); -static_assert(offsetof(Room, _shopLevel) == 0x7068); -static_assert(offsetof(Room, _shopRestockTimer) == 0x706c); -static_assert(offsetof(Room, _shopItemDeque) == 0x7070); -static_assert(offsetof(Room, _hasTriggerPressurePlates) == 0x7229); -static_assert(offsetof(Room, _slowdownDuration) == 0x722c); -static_assert(offsetof(Room, _pendingGridRemovals) == 0x7234); -static_assert(offsetof(Room, _greedWaveTimer) == 0x723c); -static_assert(offsetof(Room, _waterAmount) == 0x7240); -static_assert(offsetof(Room, _waterColor) == 0x7244); -static_assert(offsetof(Room, _waterColorMultiplier) == 0x7258); -static_assert(offsetof(Room, _waterLerpTargetColor) == 0x726c); -static_assert(offsetof(Room, _waterLerpTargetColorMult) == 0x7280); -static_assert(offsetof(Room, _waterLerpColorDuration) == 0x7294); -static_assert(offsetof(Room, _waterLerpColorCountdown) == 0x7298); -static_assert(offsetof(Room, _isFirstEnemyDead) == 0x72a0); -static_assert(offsetof(Room, _pacifist) == 0x72a1); -static_assert(offsetof(Room, _floorColor) == 0x72a4); -static_assert(offsetof(Room, _wallColor) == 0x72d0); -static_assert(offsetof(Room, _litGridIndices) == 0x7308); -static_assert(offsetof(Room, _temporaryEffects) == 0x7310); -static_assert(offsetof(Room, _outputGroupGridIndices) == 0x7328); -static_assert(offsetof(Room, _outputGroupCallbacks) == 0x7378); -static_assert(offsetof(Room, _numRainSpawners) == 0x7454); -static_assert(offsetof(Room, _rainIntensity) == 0x7458); -static_assert(offsetof(Room, _isRainStopped) == 0x745c); -static_assert(offsetof(Room, _waterCurrent) == 0x7460); -static_assert(offsetof(Room, _railManager) == 0x7468); -static_assert(offsetof(Room, _lavaIntensity) == 0x7740); -static_assert(offsetof(Room, _redDoorOutlines) == 0x7744); -static_assert(offsetof(Room, _beastBlastForce) == 0x788c); -static_assert(offsetof(Room, _isPickupVisionInvalid) == 0x7894); - -struct RoomEntry { - int _type; // Lua Entry.Type via binder 0088df10: getter 008c1c30 FUN_0085bfd0 signed dword, setter dword - uint16_t _variant; // Lua Entry.Variant via binder 0088e090: getter 008c1cf0 MOV DX,word -> FUN_0085c010 (MOVZX), setter stores 16-bit - uint16_t _subtype; // Lua Entry.Subtype via binder 0088e090: getter 008c1cf0 MOV DX,word -> FUN_0085c010 (MOVZX), setter stores 16-bit - float _weight; // Lua Entry.Weight via binder 0088e200: getter 008c1db0 pushnumber, setter checknumber -> float -}; -static_assert(offsetof(RoomEntry, _type) == 0x0); -static_assert(offsetof(RoomEntry, _variant) == 0x4); -static_assert(offsetof(RoomEntry, _subtype) == 0x6); -static_assert(offsetof(RoomEntry, _weight) == 0x8); - -struct RoomSpawn { - short _x; // Lua Spawn.X via binder 0088e450: getter 008c1e80 pushinteger((int)*(short*)) sign-extended, setter stores 16-bit - short _y; // Lua Spawn.Y via binder 0088e450: getter 008c1e80 pushinteger((int)*(short*)) sign-extended, setter stores 16-bit - uint8_t _pad_0x4[0x4]; - uint8_t _entryCount; // Lua Spawn.EntryCount via binder 0088e6c0: getter 008c1f40 pushinteger(byte, high 0), setter stores byte - uint8_t _pad_0x9[0x3]; - float _sumWeights; // Lua Spawn.SumWeights via binder 0088e840: getter 008c2000 pushnumber, setter checknumber -> float -}; -static_assert(offsetof(RoomSpawn, _x) == 0x0); -static_assert(offsetof(RoomSpawn, _y) == 0x2); -static_assert(offsetof(RoomSpawn, _entryCount) == 0x8); -static_assert(offsetof(RoomSpawn, _sumWeights) == 0xc); - -struct TearParams { - int _tearVariant; - int _bombVariant; - ColorMod _tearColor; - uint8_t _pad_0x34[0x4]; - BitSet128 _flags; // Lua TearParams.TearFlags field+0x38; TearParams::constructor (005cd690) zeroes the 4 dwords 0x38..0x44 - float _tearDamage; - float _tearScale; - float _tearHeight; -}; -static_assert(offsetof(TearParams, _tearVariant) == 0x0); -static_assert(offsetof(TearParams, _bombVariant) == 0x4); -static_assert(offsetof(TearParams, _tearColor) == 0x8); -static_assert(offsetof(TearParams, _flags) == 0x38); -static_assert(offsetof(TearParams, _tearDamage) == 0x48); -static_assert(offsetof(TearParams, _tearScale) == 0x4c); -static_assert(offsetof(TearParams, _tearHeight) == 0x50); - -struct TemporaryEffect { - uint32_t _item; // ItemConfig_Item* // Lua TemporaryEffect.Item via binder 0087bf10: getter 008bdc50 UserdataPtr with Item class (const) key c829a6, nil if 0 - int _count; - int _cooldown; -}; -static_assert(offsetof(TemporaryEffect, _item) == 0x0); -static_assert(offsetof(TemporaryEffect, _count) == 0x4); -static_assert(offsetof(TemporaryEffect, _cooldown) == 0x8); - -struct Weapon { - uint8_t _pad_0x0[0x4]; - uint32_t _owner; // Entity* // Weapon::Init 009f34d0 stores param_3 at +4; Weapon::Update 009f34f0 steps the charge by owner+0x39c; IsAxisAligned 009f3360 / Fire 009f3540 / Weapon_*::Fire read it as the Entity_Player (or familiar, type 3 -> its player) - uint8_t _technology2Laser[0x2c]; // EntityPtr; Weapon::Fire 009f3540 fires a laser into +0x8 when the owner has Technology 2 (0x98) and Removes it (vslot 0x28) when not shooting; Weapon::ClearReferences 009f3320 (and Weapon_Brimstone/Bone/Knife/Laser/UrnOfSouls ClearReferences) Remove it and erase the multiset ref - uint32_t _modifiers; // WeaponModifier bits: Weapon_Brimstone::GetMaxCharge 00a00f30 bit 0 (Chocolate Milk) scales max charge 2.5, bit 4 (Ludovico) makes it 0; GetFocusEntity 00a02870 / GetMarkedTargetVariant 00a02800 test bit 4; fire 00a02890 bit 9; Entity_Familiar::update_weapon 0062e620 copies the player's weapon +0x34 | 0x40000000 into the familiar's weapon - uint8_t _pad_0x38[0xc]; -}; -static_assert(offsetof(Weapon, _owner) == 0x4); -static_assert(offsetof(Weapon, _technology2Laser) == 0x8); -static_assert(offsetof(Weapon, _modifiers) == 0x34); -static_assert(sizeof(Weapon) == 0x44); - -struct Weapon_Brimstone { // : Weapon (flattened) - uint8_t _pad_0x0[0x4]; - uint32_t _owner; // Entity* // Weapon::Init 009f34d0 stores param_3 at +4; Weapon::Update 009f34f0 steps the charge by owner+0x39c; IsAxisAligned 009f3360 / Fire 009f3540 / Weapon_*::Fire read it as the Entity_Player (or familiar, type 3 -> its player) - uint8_t _technology2Laser[0x2c]; // EntityPtr; Weapon::Fire 009f3540 fires a laser into +0x8 when the owner has Technology 2 (0x98) and Removes it (vslot 0x28) when not shooting; Weapon::ClearReferences 009f3320 (and Weapon_Brimstone/Bone/Knife/Laser/UrnOfSouls ClearReferences) Remove it and erase the multiset ref - uint32_t _modifiers; // WeaponModifier bits: Weapon_Brimstone::GetMaxCharge 00a00f30 bit 0 (Chocolate Milk) scales max charge 2.5, bit 4 (Ludovico) makes it 0; GetFocusEntity 00a02870 / GetMarkedTargetVariant 00a02800 test bit 4; fire 00a02890 bit 9; Entity_Familiar::update_weapon 0062e620 copies the player's weapon +0x34 | 0x40000000 into the familiar's weapon - uint8_t _pad_0x38[0x10]; - uint8_t _mainLaser[0x4]; // EntityPtr; Weapon_Brimstone::GetMainEntity 009f3160 returns +0x48, GetFocusEntity 00a02870 returns it under modifier bit 4; ClearReferences 00a02790 Removes it; Fire 009ff360 stores/tests the brimstone laser there (+0x458, +0x3bc) -}; -static_assert(offsetof(Weapon_Brimstone, _owner) == 0x4); -static_assert(offsetof(Weapon_Brimstone, _technology2Laser) == 0x8); -static_assert(offsetof(Weapon_Brimstone, _modifiers) == 0x34); -static_assert(offsetof(Weapon_Brimstone, _mainLaser) == 0x48); -static_assert(sizeof(Weapon_Brimstone) == 0x4c); - -struct Weapon_MonstrosLung { // : Weapon (flattened) - uint8_t _pad_0x0[0x4]; - uint32_t _owner; // Entity* // Weapon::Init 009f34d0 stores param_3 at +4; Weapon::Update 009f34f0 steps the charge by owner+0x39c; IsAxisAligned 009f3360 / Fire 009f3540 / Weapon_*::Fire read it as the Entity_Player (or familiar, type 3 -> its player) - uint8_t _technology2Laser[0x2c]; // EntityPtr; Weapon::Fire 009f3540 fires a laser into +0x8 when the owner has Technology 2 (0x98) and Removes it (vslot 0x28) when not shooting; Weapon::ClearReferences 009f3320 (and Weapon_Brimstone/Bone/Knife/Laser/UrnOfSouls ClearReferences) Remove it and erase the multiset ref - uint32_t _modifiers; // WeaponModifier bits: Weapon_Brimstone::GetMaxCharge 00a00f30 bit 0 (Chocolate Milk) scales max charge 2.5, bit 4 (Ludovico) makes it 0; GetFocusEntity 00a02870 / GetMarkedTargetVariant 00a02800 test bit 4; fire 00a02890 bit 9; Entity_Familiar::update_weapon 0062e620 copies the player's weapon +0x34 | 0x40000000 into the familiar's weapon - uint8_t _pad_0x38[0xc]; -}; -static_assert(offsetof(Weapon_MonstrosLung, _owner) == 0x4); -static_assert(offsetof(Weapon_MonstrosLung, _technology2Laser) == 0x8); -static_assert(offsetof(Weapon_MonstrosLung, _modifiers) == 0x34); -static_assert(sizeof(Weapon_MonstrosLung) == 0x44); -#pragma pack(pop)